diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 50482eef..3c576034 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -2,6 +2,12 @@ const nextConfig = { reactStrictMode: true, transpilePackages: ['@stellar-rent/ui'], + + // Suppress ESLint errors during production build to avoid "Unknown options" failure + eslint: { + ignoreDuringBuilds: true, + }, + images: { domains: ['images.unsplash.com'], remotePatterns: [ @@ -13,32 +19,30 @@ const nextConfig = { }, ], }, - webpack: (config) => { + + webpack: (config, { _isServer }) => { + // Fix for node modules and fallback modules config.resolve.fallback = { fs: false, net: false, tls: false }; + config.experiments = { ...config.experiments, topLevelAwait: true, }; + config.resolve.alias = { ...config.resolve.alias, '~': require('node:path').resolve(__dirname, 'src'), + 'sodium-native': 'sodium-universal', }; - // Configuración para manejar módulos nativos + // Handle native node modules config.module.rules.push({ test: /\.node$/, use: 'node-loader', }); - // Configuración para manejar dependencias dinámicas config.module.unknownContextCritical = false; - // Configuración específica para el SDK de Stellar - config.resolve.alias = { - ...config.resolve.alias, - 'sodium-native': 'sodium-universal', - }; - return config; }, }; diff --git a/apps/web/src/app/dashboard/host-dashboard/components/AddPropertyModal.tsx b/apps/web/src/app/dashboard/host-dashboard/components/AddPropertyModal.tsx index 3ed19b81..020a245f 100644 --- a/apps/web/src/app/dashboard/host-dashboard/components/AddPropertyModal.tsx +++ b/apps/web/src/app/dashboard/host-dashboard/components/AddPropertyModal.tsx @@ -74,7 +74,7 @@ export const AddPropertyModal: React.FC = ({ -
+

Basic Information @@ -92,8 +92,8 @@ export const AddPropertyModal: React.FC = ({ type="text" required value={newProperty.title} - onChange={(e) => setNewProperty({ ...newProperty, title: e.target.value })} - className="w-full px-3 py-2 border dark:text-white text-black border-gray-300 rounded-lg bg-transparent " + onChange={(e) => setNewProperty((prev) => ({ ...prev, title: e.target.value }))} + className="w-full px-3 py-2 border dark:text-white text-black border-gray-300 rounded-lg bg-transparent" placeholder="Enter a catchy title for your property" />

@@ -110,9 +110,9 @@ export const AddPropertyModal: React.FC = ({ required value={newProperty.propertyType} onChange={(e) => - setNewProperty({ ...newProperty, propertyType: e.target.value }) + setNewProperty((prev) => ({ ...prev, propertyType: e.target.value })) } - className="w-full px-3 py-2 border dark:text-white border-gray-300 rounded-lg focus:ring-0 bg-transparent focus:ring-blue-500 focus:border-transparent" + className="w-full px-3 py-2 border dark:text-white border-gray-300 rounded-lg focus:ring-0 bg-transparent" > {propertyTypes.map((type) => (