mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-16 08:24:15 +00:00
Co-authored-by: alejandrobailo <alejandrobailo94@gmail.com>
25 lines
637 B
TypeScript
25 lines
637 B
TypeScript
import { create } from "zustand";
|
|
import { persist } from "zustand/middleware";
|
|
|
|
interface ComplianceWatchlistViewState {
|
|
showOnlyWatchlist: boolean;
|
|
setShowOnlyWatchlist: (value: boolean) => void;
|
|
}
|
|
|
|
export const useComplianceWatchlistViewStore =
|
|
create<ComplianceWatchlistViewState>()(
|
|
persist(
|
|
(set) => ({
|
|
showOnlyWatchlist: false,
|
|
setShowOnlyWatchlist: (value) => set({ showOnlyWatchlist: value }),
|
|
}),
|
|
{
|
|
name: "compliance-watchlist-view",
|
|
version: 1,
|
|
partialize: (state) => ({
|
|
showOnlyWatchlist: state.showOnlyWatchlist,
|
|
}),
|
|
},
|
|
),
|
|
);
|