From a7d5dbde2996b82a83875462a40778a53140fea2 Mon Sep 17 00:00:00 2001 From: Eddie Maldonado Date: Tue, 28 Nov 2023 13:48:24 -0500 Subject: [PATCH] feat: show back buttons below 800px --- assets/src/components/viewHeader.tsx | 5 +- assets/tests/components/viewHeader.test.tsx | 66 +++++++++++++++------ 2 files changed, 51 insertions(+), 20 deletions(-) diff --git a/assets/src/components/viewHeader.tsx b/assets/src/components/viewHeader.tsx index 762f3df70..b40614ed9 100644 --- a/assets/src/components/viewHeader.tsx +++ b/assets/src/components/viewHeader.tsx @@ -31,11 +31,14 @@ const ViewHeader: ViewHeaderType = ({ }): JSX.Element => { const deviceType = useScreenSize() + const screenSizeAllowsBackButton = + deviceType === "mobile" || deviceType === "mobile_landscape_tablet_portrait" + return (
{backlinkToView && backlinkToView !== OpenView.None && - deviceType === "mobile" ? ( + screenSizeAllowsBackButton ? (