Some users have gotten confused by the scenario variable editing interface. This change makes the interface easier to understand.
14 lines
379 B
TypeScript
14 lines
379 B
TypeScript
import { type PersistOptions } from "zustand/middleware/persist";
|
|
import { type State } from "./store";
|
|
|
|
export const stateToPersist = {
|
|
selectedProjectId: null as string | null,
|
|
};
|
|
|
|
export const persistOptions: PersistOptions<State, typeof stateToPersist> = {
|
|
name: "persisted-app-store",
|
|
partialize: (state) => ({
|
|
selectedProjectId: state.selectedProjectId,
|
|
}),
|
|
};
|