mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Navigate back to last viewed catalog catagory (#3163)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
e49576ee8c
commit
7058193295
4 files changed
+15
-4
No files matched your search
@@ -41,8 +41,11 @@ const storage = observable({
|
||||
* @param defaultValue
|
||||
*/
|
||||
export function createStorage<T>(key: string, defaultValue: T) {
|
||||
return createAppStorage(key, defaultValue, getHostedClusterId());
|
||||
}
|
||||
|
||||
export function createAppStorage<T>(key: string, defaultValue: T, clusterId?: string | undefined) {
|
||||
const { logPrefix } = StorageHelper;
|
||||
const clusterId = getHostedClusterId();
|
||||
const folder = path.resolve((app || remote.app).getPath("userData"), "lens-local-storage");
|
||||
const fileName = `${clusterId ?? "app"}.json`;
|
||||
const filePath = path.resolve(folder, fileName);
|
||||
|
||||
Reference in new issue
Block a user