From 31ee0221b7664b7c006240b54a1ff97f5a6ad198 Mon Sep 17 00:00:00 2001 From: enes Date: Wed, 6 Nov 2024 13:15:30 +0100 Subject: [PATCH] refactor(blogs): curated filter type --- src/pages/blogs/index.tsx | 11 +++++++---- src/utils/index.ts | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/blogs/index.tsx b/src/pages/blogs/index.tsx index 29c8506..375f1a8 100644 --- a/src/pages/blogs/index.tsx +++ b/src/pages/blogs/index.tsx @@ -13,10 +13,13 @@ import { scrollIntoView } from 'utils' export const BlogsPage = () => { const blogs = useLoaderData() as Partial[] | undefined - const [filterOptions, setFilterOptions] = useLocalStorage('filter-blog', { - sort: SortBy.Latest, - nsfw: NSFWFilter.Hide_NSFW - }) + const [filterOptions, setFilterOptions] = useLocalStorage( + 'filter-blog-curated', + { + sort: SortBy.Latest, + nsfw: NSFWFilter.Hide_NSFW + } + ) // Search const searchTermRef = useRef(null) diff --git a/src/utils/index.ts b/src/utils/index.ts index 06e7ca4..3391eb9 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -5,3 +5,4 @@ export * from './utils' export * from './zap' export * from './localStorage' export * from './consts' +export * from './blog'