import { create } from "zustand";
import { persist } from "zustand/middleware";

export const useRefererStore = create<{
  referer: string | null;
  setReferer: (referer: string | null) => void;
}>()(
  persist(
    (set) => ({
      referer: null,
      setReferer: (referer) => set({ referer }),
    }),
    {
      name: "referer-stream-demo",
    }
  )
);
