dashpresshq/dashpress

View on GitHub
src/frontend/views/integrations/password.store.ts

Summary

Maintainability
A
50 mins
Test Coverage
A
100%
import { createStore } from "@/frontend/lib/store";

type IStore = {
  password?: string;
  setPassword: (password: string) => void;
};

export const usePasswordStore = createStore<IStore>((set) => ({
  password: "",
  setPassword: (password) =>
    set(() => ({
      password,
    })),
}));