From 154efe17421ca96d433fcc1f820ad460e1675bdc Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Sat, 26 Jul 2025 12:58:01 +0000
Subject: feat: Configurable number of grid columns. Fixes #1713

---
 apps/web/lib/userLocalSettings/bookmarksLayout.tsx | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'apps/web/lib/userLocalSettings/bookmarksLayout.tsx')

diff --git a/apps/web/lib/userLocalSettings/bookmarksLayout.tsx b/apps/web/lib/userLocalSettings/bookmarksLayout.tsx
index a122c6e7..346c85e0 100644
--- a/apps/web/lib/userLocalSettings/bookmarksLayout.tsx
+++ b/apps/web/lib/userLocalSettings/bookmarksLayout.tsx
@@ -13,6 +13,7 @@ export const UserLocalSettingsCtx = createContext<
 >({
   bookmarkGridLayout: defaultLayout,
   lang: fallbackLng,
+  gridColumns: 3,
 });
 
 function useUserLocalSettings() {
@@ -29,6 +30,11 @@ export function useInterfaceLang() {
   return settings.lang;
 }
 
+export function useGridColumns() {
+  const settings = useUserLocalSettings();
+  return settings.gridColumns;
+}
+
 export function bookmarkLayoutSwitch<T>(
   layout: BookmarksLayoutTypes,
   data: Record<BookmarksLayoutTypes, T>,
-- 
cgit v1.2.3-70-g09d2

