grid: simplifying system icon and prefix storage with ship

This commit is contained in:
Hunter Miller 2021-10-12 11:04:03 -05:00
parent 5b3b2ff671
commit 0326efbd3f
3 changed files with 5 additions and 37 deletions

File diff suppressed because one or more lines are too long

View File

@ -61,7 +61,7 @@ export const useRecentsStore = create<RecentsStore>(
}),
{
whitelist: ['recentApps', 'recentDevs'],
name: 'recents-store',
name: `${window.ship}-recents-store`,
version: import.meta.env.VITE_SHORTHASH as any
}
)

View File

@ -74,7 +74,7 @@ export const optReduceState = <S extends Record<string, unknown>, U>(
export let stateStorageKeys: string[] = [];
export const stateStorageKey = (stateName: string) => {
stateName = `Grid${stateName}State-${import.meta.env.VITE_SHORTHASH as any}`;
stateName = `${window.ship}-Grid${stateName}State-${import.meta.env.VITE_SHORTHASH as any}`;
stateStorageKeys = [...new Set([...stateStorageKeys, stateName])];
return stateName;
};