Refactor theme hook and update tenant creation logic to improve clarity and consistency. Remove unused tenant_id from Users component and ensure proper variable naming in CreateTenantWizard.
This commit is contained in:
parent
a4975e37b8
commit
621670ffbc
@ -8,7 +8,7 @@ import { fetchThemeAsync } from '@/store/themeSlice';
|
|||||||
*/
|
*/
|
||||||
export const useTenantTheme = (): void => {
|
export const useTenantTheme = (): void => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const { theme, faviconUrl, isInitialized, isLoading } = useAppSelector((state) => state.theme);
|
const { faviconUrl, isInitialized, isLoading } = useAppSelector((state) => state.theme);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Only fetch if not already initialized
|
// Only fetch if not already initialized
|
||||||
|
|||||||
@ -323,8 +323,8 @@ const CreateTenantWizard = (): ReactElement => {
|
|||||||
primary_color: primary_color || undefined,
|
primary_color: primary_color || undefined,
|
||||||
secondary_color: secondary_color || undefined,
|
secondary_color: secondary_color || undefined,
|
||||||
accent_color: accent_color || undefined,
|
accent_color: accent_color || undefined,
|
||||||
logo_file_path: logoFileUrl || undefined,
|
logo_file_path: logoFilePath || undefined,
|
||||||
favicon_file_path: faviconFileUrl || undefined,
|
favicon_file_path: faviconFilePath || undefined,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -119,7 +119,6 @@ const Users = (): ReactElement => {
|
|||||||
last_name: string;
|
last_name: string;
|
||||||
status: 'active' | 'suspended' | 'deleted';
|
status: 'active' | 'suspended' | 'deleted';
|
||||||
auth_provider: 'local';
|
auth_provider: 'local';
|
||||||
tenant_id: string;
|
|
||||||
role_id: string;
|
role_id: string;
|
||||||
}): Promise<void> => {
|
}): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user