Go to Home
diff --git a/src/features/navigation/components/navbar.tsx b/src/features/navigation/components/navbar.tsx
index 2534a7e..2dbc2a0 100644
--- a/src/features/navigation/components/navbar.tsx
+++ b/src/features/navigation/components/navbar.tsx
@@ -1,5 +1,5 @@
import { useSettings } from "@/hooks";
-import { cn } from "@/lib";
+import { cn, shouldHideTitleBar } from "@/lib";
import NavBarBottom from "./containers/bottom";
import NavBarTop from "./containers/top";
@@ -13,7 +13,7 @@ const NavBar = () => {
className={cn(
"fixed inset-y-0 left-0 z-10 w-16 flex flex-col border-r bg-background",
{
- "top-8": !["none", "native"].includes(titleBarStyle),
+ "top-8": !shouldHideTitleBar(titleBarStyle),
}
)}
>
diff --git a/src/features/settings/components/sidebar.tsx b/src/features/settings/components/sidebar.tsx
index cdc0d27..6abfe59 100644
--- a/src/features/settings/components/sidebar.tsx
+++ b/src/features/settings/components/sidebar.tsx
@@ -1,6 +1,7 @@
import { AppInfo, LinkItemType } from "@/@types";
import { useLanguageContext } from "@/contexts/I18N";
-import { invoke } from "@/lib";
+import { useSettings } from "@/hooks";
+import { cn, invoke, shouldHideTitleBar } from "@/lib";
import { useQuery } from "@tanstack/react-query";
import { ReactElement } from "react";
import { FaDiscord, FaGithub } from "react-icons/fa6";
@@ -34,6 +35,7 @@ const SettingsSidebar = ({
settingsTabs: ReactElement[];
}) => {
const { t } = useLanguageContext();
+ const { settings } = useSettings();
const { data, isPending, isError } = useQuery({
queryKey: ["settings", "version"],
@@ -44,9 +46,16 @@ const SettingsSidebar = ({
});
return (
-
+
-
+
{t("sections.settings")}
diff --git a/src/lib/helpers/helpers.ts b/src/lib/helpers/helpers.ts
index 387573b..aadb8c2 100644
--- a/src/lib/helpers/helpers.ts
+++ b/src/lib/helpers/helpers.ts
@@ -1,3 +1,4 @@
+import { SettingsTitleBarStyle } from "@/@types";
import { Website } from "../api/igdb/types";
export const getSteamIdFromUrl = (url: string) =>
@@ -19,3 +20,7 @@ export const createSlug = (str: string) => {
.replace(/[^\w ]+/g, "")
.replace(/ +/g, "-");
};
+
+export const shouldHideTitleBar = (titleBarStyle: SettingsTitleBarStyle) => {
+ return ["none", "native"].includes(titleBarStyle);
+};
diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx
index 461e91e..128e488 100644
--- a/src/routes/__root.tsx
+++ b/src/routes/__root.tsx
@@ -3,7 +3,7 @@ import { TooltipProvider } from "@/components/ui/tooltip";
import NavBar from "@/features/navigation/components/navbar";
import Updater from "@/features/updater/components/updater";
import { useAppStartup, useSettings } from "@/hooks";
-import { cn } from "@/lib";
+import { cn, shouldHideTitleBar } from "@/lib";
import { createRootRoute, Outlet } from "@tanstack/react-router";
export const Route = createRootRoute({
@@ -26,7 +26,7 @@ function Root() {
{/* Sidebar navigation */}
diff --git a/src/routes/settings.tsx b/src/routes/settings.tsx
index 36b0eb5..bd9e58d 100644
--- a/src/routes/settings.tsx
+++ b/src/routes/settings.tsx
@@ -30,13 +30,13 @@ function RouteComponent() {
);
return (
-