import type { MetaFunction } from "@remix-run/node"; import { ClientOnly } from "../components/ClientOnly"; import { Suspense, useState } from "react"; import ProfilePagesHeader from "../components/ProfilePagesHeader"; import { lazyWithPreload } from "~/utils/lazy-import"; import { MapPin } from "lucide-react"; export const meta: MetaFunction = () => { return [ { title: "افزودن آدرس" }, { name: "description", content: "افزودن آدرس برای انتخاب موقعیت و دریافت آدرس", }, ]; }; export default function AddLocation() { const [showMap, setShowMap] = useState(false); return (

افزودن آدرس

{!showMap ? ( // Show form first with option to use map در حال بارگذاری...
} > {() => { const InteractiveMap = lazyWithPreload( () => import("../components/InteractiveMap") ); return (
در حال بارگذاری...
} >
{/* Button to show map */}
{/* Form only mode */}
); }} ) : ( // Show map when user clicks the button در حال بارگذاری نقشه... } > {() => { const InteractiveMap = lazyWithPreload( () => import("../components/InteractiveMap") ); return (
در حال بارگذاری نقشه...
} >
{/* Back button */}
); }}
)} ); }