Skip to content

Commit

Permalink
fix: package version and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jacovinus committed Dec 22, 2023
1 parent 89153f6 commit fd4078d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/main/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ui/main",
"private": true,
"version": "0.27.8",
"version": "0.28.2",
"type": "module",
"scripts": {
"dev": "VITE_APP_VERSION=$npm_package_version vite",
Expand Down
16 changes: 12 additions & 4 deletions packages/main/sections/Queries/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,15 @@ export const dataViewAction = (panel: any, data: any) => {
}
};

export const setLocalTabsState = (panel: string, queryId: string, value: number) => {
export const setLocalTabsState = (
panel: string,
queryId: string,
value: number
) => {
try {
const localTabs = JSON.parse(localStorage.getItem("localTabsState") || "{}");
const localTabs = JSON.parse(
localStorage.getItem("localTabsState") || "{}"
);
const panelState = localTabs[panel] || {};

panelState[queryId] = value;
Expand All @@ -107,10 +113,12 @@ export const setLocalTabsState = (panel: string, queryId: string, value: number)

export const getLocalTabsState = (panel: string, queryId: string) => {
try {
const tabsState = JSON.parse(localStorage.getItem("localTabsState") || "{}");
const tabsState = JSON.parse(
localStorage.getItem("localTabsState") || "{}"
);
return tabsState[panel]?.[queryId] || 0;
} catch (e) {
console.log(e);
return 0;
}
};
};

0 comments on commit fd4078d

Please sign in to comment.