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:
Yashwin 2026-01-29 17:42:07 +05:30
parent a4975e37b8
commit 621670ffbc
3 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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,
}, },
}, },
}; };

View File

@ -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 {