Skip to content

Commit

Permalink
Update useStore.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ailZhou committed Nov 12, 2024
1 parent 481f66d commit f3290be
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions services/ui-src/src/utils/state/useStore.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { create } from "zustand";
import { devtools, persist } from "zustand/middleware";
import { HcbsUserState, HcbsUser, HcbsReportState, AdminBannerData, ErrorVerbiage } from "types";
import {
HcbsUserState,
HcbsUser,
HcbsReportState,
AdminBannerData,
ErrorVerbiage,
AdminBannerState,
} from "types";
import { Report } from "types/report";
import React from "react";
import { buildState, mergeAnswers, setPage } from "./management/reportState";
Expand Down Expand Up @@ -85,7 +92,7 @@ const reportStore = (set: Function): HcbsReportState => ({
export const useStore = create(
// devtools is being used for debugging state
persist(
devtools<HcbsUserState & HcbsReportState>((set) => ({
devtools<HcbsUserState & HcbsReportState & AdminBannerState>((set) => ({
...userStore(set),
...bannerStore(set),
...reportStore(set),
Expand Down

0 comments on commit f3290be

Please sign in to comment.