chore: update header

pull/2509/head
Steven 2 years ago
parent 172e27016b
commit dca90fb5d2

@ -7,7 +7,7 @@ interface Props {
} }
const MobileHeader = (props: Props) => { const MobileHeader = (props: Props) => {
const { showSearch = true } = props; const { showSearch } = props;
const [titleText] = useState("MEMOS"); const [titleText] = useState("MEMOS");
return ( return (
@ -21,9 +21,7 @@ const MobileHeader = (props: Props) => {
{titleText} {titleText}
</span> </span>
</div> </div>
<div className={`${showSearch ? "flex" : "hidden"} flex-row justify-end items-center pr-1`}> <div className={`flex flex-row justify-end items-center pr-1`}>{showSearch && <HomeSidebarDrawer />}</div>
<HomeSidebarDrawer />
</div>
</div> </div>
); );
}; };

@ -36,7 +36,7 @@ const Archived = () => {
return ( return (
<section className="@container w-full max-w-3xl min-h-full flex flex-col justify-start items-start px-4 sm:px-2 sm:pt-4 pb-8 bg-zinc-100 dark:bg-zinc-800"> <section className="@container w-full max-w-3xl min-h-full flex flex-col justify-start items-start px-4 sm:px-2 sm:pt-4 pb-8 bg-zinc-100 dark:bg-zinc-800">
<MobileHeader showSearch={false} /> <MobileHeader />
<MemoFilter /> <MemoFilter />
{loadingState.isLoading ? ( {loadingState.isLoading ? (
<div className="w-full h-32 flex flex-col justify-center items-center"> <div className="w-full h-32 flex flex-col justify-center items-center">

@ -65,7 +65,7 @@ const DailyReview = () => {
return ( return (
<section className="@container w-full max-w-3xl min-h-full flex flex-col justify-start items-center px-4 sm:px-2 sm:pt-4 pb-8 bg-zinc-100 dark:bg-zinc-800"> <section className="@container w-full max-w-3xl min-h-full flex flex-col justify-start items-center px-4 sm:px-2 sm:pt-4 pb-8 bg-zinc-100 dark:bg-zinc-800">
<MobileHeader showSearch={false} /> <MobileHeader />
<div className="w-full shadow flex flex-col justify-start items-start px-4 py-3 rounded-xl bg-white dark:bg-zinc-700 text-black dark:text-gray-300"> <div className="w-full shadow flex flex-col justify-start items-start px-4 py-3 rounded-xl bg-white dark:bg-zinc-700 text-black dark:text-gray-300">
<div className="relative w-full flex flex-row justify-start items-center"> <div className="relative w-full flex flex-row justify-start items-center">
<p <p

@ -75,7 +75,7 @@ const Explore = () => {
return ( return (
<section className="@container w-full max-w-3xl min-h-full flex flex-col justify-start items-center px-4 sm:px-2 sm:pt-4 pb-8 bg-zinc-100 dark:bg-zinc-800"> <section className="@container w-full max-w-3xl min-h-full flex flex-col justify-start items-center px-4 sm:px-2 sm:pt-4 pb-8 bg-zinc-100 dark:bg-zinc-800">
<MobileHeader showSearch={false} /> <MobileHeader />
<div className="relative w-full h-auto flex flex-col justify-start items-start"> <div className="relative w-full h-auto flex flex-col justify-start items-start">
<MemoFilter /> <MemoFilter />
{sortedMemos.map((memo) => ( {sortedMemos.map((memo) => (

@ -7,7 +7,7 @@ const Home = () => {
return ( return (
<div className="w-full flex flex-row justify-start items-start"> <div className="w-full flex flex-row justify-start items-start">
<div className="w-full px-4 md:max-w-[calc(100%-14rem)] sm:px-2 sm:pt-4"> <div className="w-full px-4 md:max-w-[calc(100%-14rem)] sm:px-2 sm:pt-4">
<MobileHeader /> <MobileHeader showSearch={true} />
<MemoEditor className="mb-2" cacheKey="home-memo-editor" /> <MemoEditor className="mb-2" cacheKey="home-memo-editor" />
<MemoList /> <MemoList />
</div> </div>

@ -21,7 +21,7 @@ const Inboxes = () => {
return ( return (
<section className="@container w-full max-w-3xl min-h-full flex flex-col justify-start items-center px-4 sm:px-2 sm:pt-4 pb-8 bg-zinc-100 dark:bg-zinc-800"> <section className="@container w-full max-w-3xl min-h-full flex flex-col justify-start items-center px-4 sm:px-2 sm:pt-4 pb-8 bg-zinc-100 dark:bg-zinc-800">
<MobileHeader showSearch={false} /> <MobileHeader />
<div className="w-full shadow flex flex-col justify-start items-start px-4 py-3 rounded-xl bg-white dark:bg-zinc-700 text-black dark:text-gray-300"> <div className="w-full shadow flex flex-col justify-start items-start px-4 py-3 rounded-xl bg-white dark:bg-zinc-700 text-black dark:text-gray-300">
<div className="relative w-full flex flex-row justify-between items-center"> <div className="relative w-full flex flex-row justify-between items-center">
<p className="px-2 py-1 flex flex-row justify-start items-center select-none opacity-80"> <p className="px-2 py-1 flex flex-row justify-start items-center select-none opacity-80">

@ -63,7 +63,7 @@ const Resources = () => {
return ( return (
<section className="@container w-full max-w-3xl min-h-full flex flex-col justify-start items-center px-4 sm:px-2 sm:pt-4 pb-8 bg-zinc-100 dark:bg-zinc-800"> <section className="@container w-full max-w-3xl min-h-full flex flex-col justify-start items-center px-4 sm:px-2 sm:pt-4 pb-8 bg-zinc-100 dark:bg-zinc-800">
<MobileHeader showSearch={false} /> <MobileHeader />
<div className="w-full shadow flex flex-col justify-start items-start px-4 py-3 rounded-xl bg-white dark:bg-zinc-700 text-black dark:text-gray-300"> <div className="w-full shadow flex flex-col justify-start items-start px-4 py-3 rounded-xl bg-white dark:bg-zinc-700 text-black dark:text-gray-300">
<div className="relative w-full flex flex-row justify-between items-center"> <div className="relative w-full flex flex-row justify-between items-center">
<p className="px-2 py-1 flex flex-row justify-start items-center select-none opacity-80"> <p className="px-2 py-1 flex flex-row justify-start items-center select-none opacity-80">

@ -44,7 +44,7 @@ const Setting = () => {
return ( return (
<section className="@container w-full max-w-3xl min-h-full flex flex-col justify-start items-start px-4 sm:px-2 sm:pt-4 pb-8 bg-zinc-100 dark:bg-zinc-800"> <section className="@container w-full max-w-3xl min-h-full flex flex-col justify-start items-start px-4 sm:px-2 sm:pt-4 pb-8 bg-zinc-100 dark:bg-zinc-800">
<MobileHeader showSearch={false} /> <MobileHeader />
<div className="setting-page-wrapper"> <div className="setting-page-wrapper">
<div className="section-selector-container"> <div className="section-selector-container">
<span className="section-title">{t("common.basic")}</span> <span className="section-title">{t("common.basic")}</span>

Loading…
Cancel
Save