mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(board): default pagination with optional infinite scroll and URL-based page routing
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { create } from 'zustand';
|
||||
import { persist } from 'zustand/middleware';
|
||||
|
||||
interface FeedViewSettingsState {
|
||||
enableInfiniteScroll: boolean;
|
||||
setEnableInfiniteScroll: (enable: boolean) => void;
|
||||
}
|
||||
|
||||
const useFeedViewSettingsStore = create<FeedViewSettingsState>()(
|
||||
persist(
|
||||
(set) => ({
|
||||
enableInfiniteScroll: false,
|
||||
setEnableInfiniteScroll: (enable) => set({ enableInfiniteScroll: enable }),
|
||||
}),
|
||||
{
|
||||
name: 'feed-view-settings-store',
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
export default useFeedViewSettingsStore;
|
||||
Reference in New Issue
Block a user