import { Form } from '@inertiajs/react'; import { ExternalLink, Globe, GlobeLock } from 'lucide-react'; import StorePublishController from '@/actions/App/Http/Controllers/StorePublishController'; import { Button } from '@/components/ui/button'; import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from '@/components/ui/dialog'; import { formatDateTime } from '@/lib/money'; import type { Store } from '@/types'; /** * Shows whether the store is live, where shoppers open it, and the buttons to publish or take it offline. */ export default function PublishPanel({ store, busy, }: { store: Store; busy: boolean; }) { const address = store.live_url.replace(/^https?:\/\//, ''); if (!store.is_published) { return (
Your store is not live
Only you can see it. When you publish, shoppers can open it at{' '} {address} .
You changed the design since you last published. Shoppers still see the older version.