mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
feat(FE): add state filter dashboard with store
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
'use client';
|
||||
|
||||
import { create } from 'zustand';
|
||||
import { devtools, persist } from 'zustand/middleware';
|
||||
import { createDashboardFilterSlice } from '@/stores/dashboard/slices/dashboard-filter.slice';
|
||||
import { DashboardFilterSlice } from '@/types/stores';
|
||||
|
||||
export type DashboardStore = DashboardFilterSlice;
|
||||
|
||||
export const useDashboardStore = create<DashboardStore>()(
|
||||
devtools(
|
||||
persist(
|
||||
(...args) => ({
|
||||
...createDashboardFilterSlice(...args),
|
||||
}),
|
||||
{
|
||||
name: 'dashboard-filter-cache',
|
||||
}
|
||||
),
|
||||
{
|
||||
name: 'DashboardStore',
|
||||
}
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user