From 7b823134c8efee747a4a9d901ce9b43fcc1bfc62 Mon Sep 17 00:00:00 2001 From: ttang Date: Mon, 26 Jun 2023 13:32:36 +0800 Subject: [PATCH] feat: backBtn valuable check --- packages/client/scan/src/components/Header.tsx | 2 +- packages/client/scan/src/components/Nav.tsx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/client/scan/src/components/Header.tsx b/packages/client/scan/src/components/Header.tsx index bf623d3a..c6bd9d70 100644 --- a/packages/client/scan/src/components/Header.tsx +++ b/packages/client/scan/src/components/Header.tsx @@ -48,7 +48,7 @@ export default function Header() { return (
- {(showBack && ( + {(showBack && window.history.length > 1 && ( { if (location.pathname.startsWith('/models/modelview')) { diff --git a/packages/client/scan/src/components/Nav.tsx b/packages/client/scan/src/components/Nav.tsx index 9a6f2744..dcc4a4f9 100644 --- a/packages/client/scan/src/components/Nav.tsx +++ b/packages/client/scan/src/components/Nav.tsx @@ -3,7 +3,6 @@ import styled from 'styled-components' import GitHubButton from 'react-github-btn' import Logo from './Logo' -import LoginButton from './LoginButton' import { useCeramicCtx } from '../context/CeramicCtx' export default function Nav() {