From 8d642c478563cf6d0c1111361d49a1371fb805ce Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Mon, 12 Feb 2024 23:02:25 -0800 Subject: [PATCH] garbage mobile fix --- src/app/components/MobileMenu.tsx | 7 ++- src/app/components/News.tsx | 2 +- src/app/components/SearchBar.tsx | 5 +- src/app/components/mobileMenu.module.css | 10 +++- src/app/container/container.module.css | 12 +++- src/app/layout.tsx | 74 +++++++++++++----------- src/app/search/page.tsx | 3 +- 7 files changed, 68 insertions(+), 45 deletions(-) diff --git a/src/app/components/MobileMenu.tsx b/src/app/components/MobileMenu.tsx index 443fa61..da47680 100644 --- a/src/app/components/MobileMenu.tsx +++ b/src/app/components/MobileMenu.tsx @@ -32,6 +32,11 @@ export default function MobileMenu() { } } + const handleSubmit = () => { + setIsOpen(false) + document.body.style.overflow = 'auto' + } + return (
- {children} - + + diff --git a/src/app/search/page.tsx b/src/app/search/page.tsx index b33404b..3445007 100644 --- a/src/app/search/page.tsx +++ b/src/app/search/page.tsx @@ -1,12 +1,11 @@ 'use client' -import { useSearchParams } from 'next/navigation' +import { useSearchParams, useRouter } from 'next/navigation' import { Zilla_Slab } from 'next/font/google' import { Topics, Authors } from '@/app/components/DataDisplay' import { Status, ItemBadge } from '@/app/components/Badges' import { epoch2datestring } from '../utils/epoch2datestring' import searchDocs, { CustomSearchResult } from '@/app/utils/searchDocs' import { useSuspenseQuery } from '@tanstack/react-query' -import { useRouter } from 'next/navigation' const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500', '700'] })