import InputError from '@/components/input-error'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import { Link, router, useForm } from '@inertiajs/react'; import React, { ChangeEvent, ReactNode } from 'react'; import timezones from './data/timezones'; import Layout from './Partials/Layout'; import StepNavigator from './Partials/StepNavigator'; interface Props { // APP_NAME: string; APP_ENV: string; APP_DEBUG: string; APP_KEY: string; APP_TIMEZONE: string; APP_URL: string; } const Step2 = (props: Props) => { const { APP_ENV, APP_DEBUG, APP_KEY, APP_TIMEZONE } = props; const { data, errors, post, setData } = useForm({ // app_name: APP_NAME.replaceAll('"', '') || '', app_env: APP_ENV || 'local', app_debug: JSON.stringify(APP_DEBUG) || 'true', app_key: APP_KEY || '', app_timezone: APP_TIMEZONE.replaceAll('"', '') || '', app_url: window.location.origin, }); const onHandleChange = (event: ChangeEvent) => { const target = event.target as HTMLInputElement; setData({ ...data, [target.name]: target.value, }); }; const handleGenerateKey = () => { router.get(route('generate-app-key')); }; const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); post(route('install.store-step2')); }; return (
); }; Step2.layout = (page: ReactNode) => ; export default Step2;