From d7661a44a94b1c5c1cca22e104c44bd83135664e Mon Sep 17 00:00:00 2001 From: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com> Date: Thu, 8 Aug 2024 17:15:18 +1200 Subject: [PATCH 1/3] fix: broken mobile styling of the library version redirect banner --- app/components/RedirectVersionBanner.tsx | 36 +++++++++++++----------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/app/components/RedirectVersionBanner.tsx b/app/components/RedirectVersionBanner.tsx index 4b4a34bd..16b76a25 100644 --- a/app/components/RedirectVersionBanner.tsx +++ b/app/components/RedirectVersionBanner.tsx @@ -21,8 +21,8 @@ export function RedirectVersionBanner(props: { if (![latestVersion, 'latest'].includes(version) && showModal) { return ( -
-
+
+

You are currently reading {version} docs. Redirect to{' '} {' '} version? +

+
+ + Latest + +
- - Latest - -
) } From e3696b107d23bd6acc3c885f21c118d66f34f4c5 Mon Sep 17 00:00:00 2001 From: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com> Date: Thu, 8 Aug 2024 17:17:38 +1200 Subject: [PATCH 2/3] fix: on mobile reduce the gap between the primary redirect banner elements --- app/components/RedirectVersionBanner.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/RedirectVersionBanner.tsx b/app/components/RedirectVersionBanner.tsx index 16b76a25..afc178cd 100644 --- a/app/components/RedirectVersionBanner.tsx +++ b/app/components/RedirectVersionBanner.tsx @@ -21,7 +21,7 @@ export function RedirectVersionBanner(props: { if (![latestVersion, 'latest'].includes(version) && showModal) { return ( -
+

You are currently reading {version} docs. Redirect to{' '} Date: Thu, 8 Aug 2024 17:18:52 +1200 Subject: [PATCH 3/3] fix: follow react rules and return null --- app/components/RedirectVersionBanner.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/components/RedirectVersionBanner.tsx b/app/components/RedirectVersionBanner.tsx index afc178cd..6ac672ea 100644 --- a/app/components/RedirectVersionBanner.tsx +++ b/app/components/RedirectVersionBanner.tsx @@ -54,4 +54,6 @@ export function RedirectVersionBanner(props: {

) } + + return null }