Add quality gates and baseline tests for web/mobile
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { getFirestore, doc, getDoc } from "firebase/firestore";
|
||||
import { app } from "../features/auth/firebase";
|
||||
import { getDashboardPath as getDashboardPathFromRole } from "../features/auth/roleUtils";
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore - generated dataconnect types may not be resolvable in this context
|
||||
import { getUserById } from "@/dataconnect-generated";
|
||||
@@ -68,11 +69,5 @@ export const fetchUserData = async (uid: string): Promise<UserData | null> => {
|
||||
* @returns The appropriate dashboard path
|
||||
*/
|
||||
export const getDashboardPath = (userRole: string): string => {
|
||||
const roleMap: Record<string, string> = {
|
||||
admin: "/dashboard/admin",
|
||||
client: "/dashboard/client",
|
||||
vendor: "/dashboard/vendor",
|
||||
};
|
||||
|
||||
return roleMap[userRole.toLowerCase()] || "/dashboard/client";
|
||||
return getDashboardPathFromRole(userRole);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user