UNPKG

@particle-network/connectkit

Version:
29 lines (26 loc) 750 B
"use client"; import { __esm } from "./chunk-Y7A564BU.mjs"; // src/hooks/useLastConnectorId.ts import { create } from "zustand"; var initialState, useLastConnectorId; var init_useLastConnectorId = __esm({ "src/hooks/useLastConnectorId.ts"() { "use strict"; initialState = typeof window !== "undefined" ? localStorage.getItem("pcm-recent") : void 0; useLastConnectorId = create((set) => ({ lastConnectorId: initialState, updateLastConnectorId: (value) => { const id = value.replace("solana_", ""); localStorage.setItem("pcm-recent", id); set({ lastConnectorId: id }); } })); } }); export { useLastConnectorId, init_useLastConnectorId }; //# sourceMappingURL=chunk-XV4TVGGP.mjs.map