mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-29 06:10:47 +00:00
♻️ refactor
This commit is contained in:
@@ -1746,7 +1746,7 @@
|
||||
"brandingResourceTitle": "Title for Resource Auth Page",
|
||||
"brandingResourceSubtitle": "Subtitle for Resource Auth Page",
|
||||
"brandingResourceDescription": "{resourceName} will be replaced with the organization's name",
|
||||
"saveAuthPage": "Save Auth Page",
|
||||
"saveAuthPageDomain": "Save Domain",
|
||||
"saveAuthPageBranding": "Save Branding",
|
||||
"removeAuthPageBranding": "Remove Branding",
|
||||
"noDomainSet": "No domain set",
|
||||
|
||||
@@ -68,8 +68,6 @@ const AuthPageFormSchema = z.object({
|
||||
authPageSubdomain: z.string().optional()
|
||||
});
|
||||
|
||||
type AuthPageFormValues = z.infer<typeof AuthPageFormSchema>;
|
||||
|
||||
interface AuthPageSettingsProps {
|
||||
onSaveSuccess?: () => void;
|
||||
onSaveError?: (error: any) => void;
|
||||
@@ -119,18 +117,6 @@ function AuthPageSettings({
|
||||
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
|
||||
useEffect(() => {
|
||||
const fetchDomains = async () => {
|
||||
@@ -452,7 +438,7 @@ function AuthPageSettings({
|
||||
loading={isSubmitting}
|
||||
disabled={isSubmitting || !hasUnsavedChanges}
|
||||
>
|
||||
{t("saveAuthPage")}
|
||||
{t("saveAuthPageDomain")}
|
||||
</Button>
|
||||
</div>
|
||||
</SettingsSection>
|
||||
|
||||
Reference in New Issue
Block a user