mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(topbar): add customizable visibility controls for directories and subscriptions
This commit is contained in:
@@ -33,12 +33,17 @@ const useDisclaimerModalStore = create<DisclaimerModalState>((set) => ({
|
||||
targetAddress: null,
|
||||
targetBoardPath: null,
|
||||
|
||||
showDisclaimerModal: (address: string, navigate: NavigateFunction, boardPath?: string) => {
|
||||
showDisclaimerModal: (address: string, navigate: NavigateFunction, boardPath?: string | null) => {
|
||||
// Check if user has already accepted the disclaimer
|
||||
if (hasAcceptedDisclaimer()) {
|
||||
// Navigate directly without showing modal
|
||||
const path = boardPath || address;
|
||||
navigate(`/${path}`);
|
||||
// If there's a valid board path, navigate directly
|
||||
if (boardPath) {
|
||||
navigate(`/${boardPath}`);
|
||||
return;
|
||||
}
|
||||
// If no board path (placeholder), don't navigate - we'll handle this separately
|
||||
// Don't show disclaimer modal either since it's already accepted
|
||||
// Caller should handle showing directory modal or other UI
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user