Инициализация в новом репозитории

This commit is contained in:
commit eb1f18f53e
374 changed files with 226678 additions and 0 deletions

View file

@ -0,0 +1,20 @@
import {create} from 'zustand'
import { persist, createJSONStorage } from 'zustand/middleware'
interface IpAddressState {
ipAddress: string;
setIpAddress: (newIp: string) => void;
}
export const useIpStore = create<IpAddressState>()(
persist(
(set)=>({
ipAddress: 'localhost',
setIpAddress: (newIp: string) => set({ ipAddress: newIp }),
}),
{
name: 'currentIp-storage',
storage: createJSONStorage(()=>localStorage)
}
)
)