Skip to content

Commit

Permalink
fix: 445bde2
Browse files Browse the repository at this point in the history
  • Loading branch information
shm11C3 committed Oct 6, 2024
1 parent 445bde2 commit 5429cac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ import {
useErrorModalListener,
useSettingsModalListener,
} from "@/hooks/useTauriEventListener";
import { useAtom } from "jotai";
import type { ErrorInfo } from "react";
import { ErrorBoundary } from "react-error-boundary";
import { selectedMenuAtom } from "./atom/ui";
import { useSettingsAtom } from "./atom/useSettingsAtom";
import ErrorFallback from "./components/ErrorFallback";
import { useDarkMode } from "./hooks/useDarkMode";
import ScreenTemplate from "./template/ScreenTemplate";
import Settings from "./template/Settings";
import SideMenu from "./template/SideMenu";
import type { SelectedMenuType } from "./types/ui";

const onError = (error: Error, info: ErrorInfo) => {
console.log("error.message", error.message);
Expand Down Expand Up @@ -61,7 +64,7 @@ const Page = () => {
<ErrorBoundary FallbackComponent={ErrorFallback} onError={onError}>
<div className="bg-slate-200 dark:bg-gray-900 text-gray-900 dark:text-white min-h-screen">
<SideMenu />
{displayTargets[settings.state.display]}
{displayTargets[selectedMenu]}
</div>
</ErrorBoundary>
);
Expand Down

0 comments on commit 5429cac

Please sign in to comment.