Added localstorage data
This commit is contained in:
@@ -25,6 +25,24 @@ export function useCommonHooks() {
|
||||
const [searchValue, setSearchValue] = useState('');
|
||||
const [providerLabel, setProviderLabel] = useState('Google Search');
|
||||
const [providerURL, setProviderURL] = useState('https://www.google.com/search?q=');
|
||||
const [currentUser, setCurrentUser] = useLocalStorage<any>({
|
||||
key: 'user',
|
||||
defaultValue: {
|
||||
firstName: 'First',
|
||||
lastName: 'Last',
|
||||
},
|
||||
});
|
||||
const [currentLocation, setCurrentLocation] = useLocalStorage<any>({
|
||||
key: 'location',
|
||||
defaultValue: {
|
||||
office: 'HGX',
|
||||
station: 'KHOU',
|
||||
x: 65,
|
||||
y: 96,
|
||||
lat: 29.750950134386066,
|
||||
lon: -95.36220654860034,
|
||||
},
|
||||
});
|
||||
|
||||
const handleThemeChange = (themes: any, save: any) => {
|
||||
const enabled = themes
|
||||
@@ -59,5 +77,9 @@ export function useCommonHooks() {
|
||||
setProviderLabel,
|
||||
providerURL,
|
||||
setProviderURL,
|
||||
currentUser,
|
||||
setCurrentUser,
|
||||
currentLocation,
|
||||
setCurrentLocation,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user