Skip to content

Commit

Permalink
Revert to using "mode" urlParam.
Browse files Browse the repository at this point in the history
  • Loading branch information
lublagg committed Dec 11, 2024
1 parent c9b2e14 commit 195e5fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const App = observer(() => {
const [keyboardShortcutEnabled, setKeyboardShortcutEnabled] = useState(isShortcutEnabled);
const shortcutKeys = localStorage.getItem("keyboardShortcutKeys") || appConfig.accessibility.keyboardShortcut;
const [keyboardShortcutKeys, setKeyboardShortcutKeys] = useState(shortcutKeys);
const isDevMode = getUrlParam("dev") || appConfig.mode === "development";
const modeUrlParam = getUrlParam("mode") || "";
const isDevMode = modeUrlParam === "development" || appConfig.mode === "development";
const [showDebugLog, setShowDebugLog] = useState(isDevMode);

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const isInputElement = (activeElement: Element | null) => {

export const getUrlParam = (paramName: string) => {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.has(paramName);
return urlParams.get(paramName);
};

export const keyMap: Record<string, { shifted: string; unshifted: string }> = {
Expand Down

0 comments on commit 195e5fd

Please sign in to comment.