mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(rules): add URL params for direct links to board rules
Support /rules/:boardIdentifier (e.g. /rules/pol, /rules/somedomain.eth). Selection updates URL; rules page always uses yotsuba theme.
This commit is contained in:
@@ -55,6 +55,11 @@ const useTheme = (): [string, (theme: string) => void] => {
|
||||
return 'yotsuba';
|
||||
}
|
||||
|
||||
// Always use yotsuba for rules page (boardIdentifier in URL is for loading rules, not theming)
|
||||
if (location.pathname.startsWith('/rules')) {
|
||||
return 'yotsuba';
|
||||
}
|
||||
|
||||
// If special theme is enabled, use tomorrow
|
||||
if (isEnabled) {
|
||||
return 'tomorrow';
|
||||
|
||||
Reference in New Issue
Block a user