refactor(blogs): curated filter type

This commit is contained in:
enes 2024-11-06 13:15:30 +01:00
parent c81b2c0a1d
commit 31ee0221b7
2 changed files with 8 additions and 4 deletions

View File

@ -13,10 +13,13 @@ import { scrollIntoView } from 'utils'
export const BlogsPage = () => { export const BlogsPage = () => {
const blogs = useLoaderData() as Partial<BlogCardDetails>[] | undefined const blogs = useLoaderData() as Partial<BlogCardDetails>[] | undefined
const [filterOptions, setFilterOptions] = useLocalStorage('filter-blog', { const [filterOptions, setFilterOptions] = useLocalStorage(
sort: SortBy.Latest, 'filter-blog-curated',
nsfw: NSFWFilter.Hide_NSFW {
}) sort: SortBy.Latest,
nsfw: NSFWFilter.Hide_NSFW
}
)
// Search // Search
const searchTermRef = useRef<HTMLInputElement>(null) const searchTermRef = useRef<HTMLInputElement>(null)

View File

@ -5,3 +5,4 @@ export * from './utils'
export * from './zap' export * from './zap'
export * from './localStorage' export * from './localStorage'
export * from './consts' export * from './consts'
export * from './blog'