Сборка фронт части
This commit is contained in:
parent
43f0bc1cdc
commit
dfbd387fae
176 changed files with 7839 additions and 1032 deletions
20
FRONT/BUILD/resources/app/src/store/ipStore.ts
Normal file
20
FRONT/BUILD/resources/app/src/store/ipStore.ts
Normal 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: '192:168.1.147',
|
||||
setIpAddress: (newIp: string) => set({ ipAddress: newIp }),
|
||||
}),
|
||||
{
|
||||
name: 'currentIp-storage',
|
||||
storage: createJSONStorage(()=>localStorage)
|
||||
}
|
||||
)
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue