refactor(frontend): moved types to global types and successfull build

This commit is contained in:
2025-03-03 06:32:46 -06:00
parent 89a2b3ea9e
commit f3b92e94e3
11 changed files with 91 additions and 50 deletions

View File

@@ -1,17 +1,6 @@
import {create} from "zustand";
import {useSessionStore} from "./sessionStore";
//import useSWR from "swr";
interface Modules {
module_id: string;
name: string;
active: boolean;
roles: string;
add_user: string;
add_date: Date;
upd_user: string;
upd_date: Date;
}
import {Modules} from "@/types/modules";
interface SettingState {
userRoles: Modules[];
@@ -23,7 +12,7 @@ interface FetchModulesResponse {
data: Modules[];
}
export const useModuleStore = create<SettingState>()((set) => ({
export const useGetUserRoles = create<SettingState>()((set) => ({
userRoles: [],
setUserRoles: (userRoles) => set({userRoles}),
fetchUserRoles: async () => {