♻️ refactor

This commit is contained in:
Fred KISSIE
2025-11-12 03:50:04 +01:00
parent cfde4e7443
commit 4bd1c4e0c6
2 changed files with 2 additions and 16 deletions

View File

@@ -1746,7 +1746,7 @@
"brandingResourceTitle": "Title for Resource Auth Page", "brandingResourceTitle": "Title for Resource Auth Page",
"brandingResourceSubtitle": "Subtitle for Resource Auth Page", "brandingResourceSubtitle": "Subtitle for Resource Auth Page",
"brandingResourceDescription": "{resourceName} will be replaced with the organization's name", "brandingResourceDescription": "{resourceName} will be replaced with the organization's name",
"saveAuthPage": "Save Auth Page", "saveAuthPageDomain": "Save Domain",
"saveAuthPageBranding": "Save Branding", "saveAuthPageBranding": "Save Branding",
"removeAuthPageBranding": "Remove Branding", "removeAuthPageBranding": "Remove Branding",
"noDomainSet": "No domain set", "noDomainSet": "No domain set",

View File

@@ -68,8 +68,6 @@ const AuthPageFormSchema = z.object({
authPageSubdomain: z.string().optional() authPageSubdomain: z.string().optional()
}); });
type AuthPageFormValues = z.infer<typeof AuthPageFormSchema>;
interface AuthPageSettingsProps { interface AuthPageSettingsProps {
onSaveSuccess?: () => void; onSaveSuccess?: () => void;
onSaveError?: (error: any) => void; onSaveError?: (error: any) => void;
@@ -119,18 +117,6 @@ function AuthPageSettings({
mode: "onChange" mode: "onChange"
}); });
// Expose save function to parent component
// useImperativeHandle(
// ref,
// () => ({
// saveAuthSettings: async () => {
// await form.handleSubmit(onSubmit)();
// },
// hasUnsavedChanges: () => hasUnsavedChanges
// }),
// [form, hasUnsavedChanges]
// );
// Fetch login page and domains data // Fetch login page and domains data
useEffect(() => { useEffect(() => {
const fetchDomains = async () => { const fetchDomains = async () => {
@@ -452,7 +438,7 @@ function AuthPageSettings({
loading={isSubmitting} loading={isSubmitting}
disabled={isSubmitting || !hasUnsavedChanges} disabled={isSubmitting || !hasUnsavedChanges}
> >
{t("saveAuthPage")} {t("saveAuthPageDomain")}
</Button> </Button>
</div> </div>
</SettingsSection> </SettingsSection>