Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

minor fix

daniel31x13e1149c2733db
diff --git a/components/ViewDropdown.tsx b/components/ViewDropdown.tsx
index aaf475be..38905614 100644
--- a/components/ViewDropdown.tsx
+++ b/components/ViewDropdown.tsx
@@ -1,4 +1,4 @@
-import React, { Dispatch, SetStateAction } from "react";
+import React, { Dispatch, SetStateAction, useEffect } from "react";
import useLocalSettingsStore from "@/store/localSettings";
import { ViewMode } from "@/types/global";
import { dropdownTriggerer } from "@/lib/client/utils";
@@ -13,6 +13,10 @@ export default function ViewDropdown({ viewMode, setViewMode }: Props) {
const { settings, updateSettings } = useLocalSettingsStore((state) => state);
const { t } = useTranslation();
+ useEffect(() => {
+ updateSettings({ viewMode });
+ }, [viewMode, updateSettings]);
+
const onChangeViewMode = (mode: ViewMode) => {
setViewMode(mode);
updateSettings({ viewMode });