import { Form, Head, Link } from '@inertiajs/react'; import StoreController from '@/actions/App/Http/Controllers/StoreController'; import StoreSettingsController from '@/actions/App/Http/Controllers/StoreSettingsController'; import InputError from '@/components/input-error'; import StoreNav from '@/components/stores/store-nav'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from '@/components/ui/card'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { dashboard } from '@/routes'; import type { StoreSummary } from '@/types'; type Settings = { whatsapp_number: string | null; shipping_west: string; shipping_east: string; free_shipping_over: string | null; }; export default function StoreSettings({ store, settings, }: { store: StoreSummary; settings: Settings; }) { return ( <>

{store.name}

Back to store

{({ processing, errors }) => ( <> WhatsApp Shoppers see a WhatsApp chat button on every page of your store, and on their order page. Leave empty to hide it. Shipping fees Added at checkout, based on the shopper’s state.

Leave empty to always charge shipping. Enter 0 to always ship free.

)}
); } StoreSettings.layout = { breadcrumbs: [ { title: 'Dashboard', href: dashboard() }, { title: 'Settings', href: '#' }, ], };