Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
at main 34 lines 790 B view raw
1import type { Address } from "viem"; 2import { createTrackedStore } from "@/store/createTrackedStore"; 3 4export interface FundingToken { 5 contractAddress: Address; 6 symbol: string; 7} 8 9interface TopUpAmount { 10 showFundModal: boolean; 11 token?: FundingToken; 12 amountToTopUp?: number; 13} 14 15interface State { 16 showFundModal: boolean; 17 token?: FundingToken; 18 amountToTopUp?: number; 19 setShowFundModal: ({ 20 showFundModal, 21 token, 22 amountToTopUp 23 }: TopUpAmount) => void; 24} 25 26const { useStore: useFundModalStore } = createTrackedStore<State>((set) => ({ 27 amountToTopUp: undefined, 28 setShowFundModal: ({ showFundModal, token, amountToTopUp }) => 29 set(() => ({ amountToTopUp, showFundModal, token })), 30 showFundModal: false, 31 token: undefined 32})); 33 34export { useFundModalStore };