Skip to content

Commit

Permalink
Merge pull request #318 from EpicsDAO/improve-doc
Browse files Browse the repository at this point in the history
always show header when user on top
  • Loading branch information
KishiTheMechanic authored Oct 17, 2024
2 parents 04aa462 + 3179bcf commit adaab62
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 5 additions & 1 deletion website/solv-epics-dev/src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ export default async function LocaleLayout({
className={cn(`${inter.variable} ${notoSansJP.variable}`)}
suppressHydrationWarning
>
<ThemeProvider attribute="class" defaultTheme="dark">
<ThemeProvider
attribute="class"
defaultTheme="dark"
enableSystem={false}
>
<NextIntlClientProvider messages={messages}>
{children}
<Toaster />
Expand Down
3 changes: 0 additions & 3 deletions website/solv-epics-dev/src/components/config/ModeToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ export function ModeToggle() {
<DropdownMenuItem onClick={() => setTheme('dark')}>
{t('common.darkMode')}
</DropdownMenuItem>
<DropdownMenuItem onClick={() => setTheme('system')}>
{t('common.systemMode')}
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
)
Expand Down
2 changes: 1 addition & 1 deletion website/solv-epics-dev/src/hooks/utils/useShowHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function useShowHeader({ defaultShowHeader = true }: Props = {}) {
const handleScroll = () => {
const currentScrollY = window.scrollY

if (currentScrollY < lastScrollY) {
if (currentScrollY < 80 || currentScrollY < lastScrollY) {
setShowHeader(true)
} else {
setShowHeader(false)
Expand Down

0 comments on commit adaab62

Please sign in to comment.