import InputError from '@/components/input-error'; import LoadingButton from '@/components/loading-button'; import Switch from '@/components/switch'; import { Card } from '@/components/ui/card'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { useLang } from '@/hooks/use-lang'; import { onHandleChange } from '@/lib/inertia'; import { useForm } from '@inertiajs/react'; interface Props { auth: Settings; } const Google = (props: Props) => { const { auth, input, button, common } = useLang(); const { data, setData, post, errors, processing } = useForm({ ...(props.auth.fields as GoogleAuthFields), type: 'google_auth', }); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); post(route('settings.auth0.update', { id: props.auth.id })); }; return (

{auth.google_auth_settings}

{auth.google_auth_description}

setData('active', checked)} />

{auth.google_auth}

onHandleChange(e, setData)} placeholder={input.google_client_id_placeholder} />
onHandleChange(e, setData)} placeholder={input.google_client_secret_placeholder} />
onHandleChange(e, setData)} placeholder={input.google_redirect_uri} />
{button.save_changes}
); }; export default Google;