From 99264f2c38923a3fbb5e8730de48ce555a2bcf9d Mon Sep 17 00:00:00 2001 From: Niall Maher Date: Tue, 7 Feb 2023 13:46:18 -0500 Subject: [PATCH 1/3] Fix broken tabs on mobile my posts screen * Update color to be white * Add handler to select options onChange --- pages/my-posts/index.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pages/my-posts/index.tsx b/pages/my-posts/index.tsx index 5d1e2190..c8a22ced 100644 --- a/pages/my-posts/index.tsx +++ b/pages/my-posts/index.tsx @@ -136,11 +136,19 @@ const MyPosts: NextPage = ({ From f20bf63ab58a32c85d4bf23c6a54b911f2217182 Mon Sep 17 00:00:00 2001 From: Niall Maher Date: Tue, 7 Feb 2023 14:04:17 -0500 Subject: [PATCH 2/3] Explicitly add value --- pages/my-posts/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/my-posts/index.tsx b/pages/my-posts/index.tsx index c8a22ced..26c42af2 100644 --- a/pages/my-posts/index.tsx +++ b/pages/my-posts/index.tsx @@ -48,6 +48,7 @@ const MyPosts: NextPage = ({ { name: "Drafts", href: "?tab=drafts", + value: "drafts", data: drafts.data, status: drafts.status, current: tab !== "published", @@ -55,6 +56,7 @@ const MyPosts: NextPage = ({ { name: "Published", href: "?tab=published", + value: "published", data: published.data, status: published.status, current: tab === "published", @@ -139,14 +141,12 @@ const MyPosts: NextPage = ({ className="block w-full text-white" onChange={(e) => { const { value } = e.target; - router.push(`?tab=${value.toLowerCase()}`) + router.push(`?tab=${value.toLowerCase()}`); }} defaultValue={tabs.find((tab) => tab.current)?.name} > {tabs.map((tab) => ( - ))} From eef80b923c4ef9754dc60ec6087e1b2c3cfccf45 Mon Sep 17 00:00:00 2001 From: Niall Maher Date: Tue, 7 Feb 2023 14:04:23 -0500 Subject: [PATCH 3/3] Explicitly add value