diff --git a/next-env.d.ts b/next-env.d.ts index fd36f949..4f11a03d 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,5 @@ /// /// -/// // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/src/app/(dashboard)/app-store/[id]/components/AppDetailsContainer/AppDetailsContainer.tsx b/src/app/(dashboard)/app-store/[id]/components/AppDetailsContainer/AppDetailsContainer.tsx index b53de597..e98d0c97 100644 --- a/src/app/(dashboard)/app-store/[id]/components/AppDetailsContainer/AppDetailsContainer.tsx +++ b/src/app/(dashboard)/app-store/[id]/components/AppDetailsContainer/AppDetailsContainer.tsx @@ -116,8 +116,7 @@ export const AppDetailsContainer: React.FC = ({ app, localDomain }) => { const handleInstallSubmit = async (values: FormValues) => { setCustomStatus('installing'); installDisclosure.close(); - const { exposed, domain } = values; - installMutation.execute({ id: app.id, form: values, exposed, domain }); + installMutation.execute({ id: app.id, form: values }); }; const handleUnistallSubmit = () => { @@ -139,8 +138,7 @@ export const AppDetailsContainer: React.FC = ({ app, localDomain }) => { const handleUpdateSettingsSubmit = async (values: FormValues) => { updateSettingsDisclosure.close(); - const { exposed, domain } = values; - updateConfigMutation.execute({ id: app.id, form: values, exposed, domain }); + updateConfigMutation.execute({ id: app.id, form: values }); }; const handleUpdateSubmit = async () => { @@ -185,8 +183,6 @@ export const AppDetailsContainer: React.FC = ({ app, localDomain }) => { onClose={updateSettingsDisclosure.close} info={app.info} config={castAppConfig(app?.config)} - exposed={app?.exposed} - domain={app?.domain || ''} />
diff --git a/src/app/(dashboard)/app-store/[id]/components/InstallForm/InstallForm.tsx b/src/app/(dashboard)/app-store/[id]/components/InstallForm/InstallForm.tsx index 4741d50e..c0e7d1e1 100644 --- a/src/app/(dashboard)/app-store/[id]/components/InstallForm/InstallForm.tsx +++ b/src/app/(dashboard)/app-store/[id]/components/InstallForm/InstallForm.tsx @@ -14,7 +14,7 @@ import { validateAppConfig } from '../../utils/validators'; interface IProps { formFields: FormField[]; onSubmit: (values: FormValues) => void; - initalValues?: { exposed?: boolean; domain?: string } & { [key: string]: string | boolean | undefined }; + initalValues?: { [key: string]: unknown }; info: AppInfo; loading?: boolean; } @@ -22,6 +22,7 @@ interface IProps { export type FormValues = { exposed?: boolean; domain?: string; + isVisibleOnGuestDashboard?: boolean; [key: string]: string | boolean | undefined; }; @@ -50,7 +51,7 @@ export const InstallForm: React.FC = ({ formFields, info, onSubmit, init useEffect(() => { if (initalValues && !isDirty) { Object.entries(initalValues).forEach(([key, value]) => { - setValue(key, value); + setValue(key, value as string); }); } }, [initalValues, isDirty, setValue]); @@ -153,6 +154,14 @@ export const InstallForm: React.FC = ({ formFields, info, onSubmit, init return (
{formFields.filter(typeFilter).map(renderField)} + ( + + )} + /> {info.exposable && renderExposeForm()}