chore: add back&forward for web​ (#4403)

This commit is contained in:
JimmFly 2023-09-20 01:49:39 +08:00 committed by GitHub
parent f395a955a2
commit 38417878fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,6 @@ export const SidebarHeader = (props: SidebarHeaderProps) => {
data-is-macos-electron={environment.isDesktop && environment.isMacOs}
>
<SidebarSwitch show={open} />
{environment.isDesktop && (
<div className={navHeaderNavigationButtons}>
<IconButton
className={navHeaderButton}
@ -45,10 +44,11 @@ export const SidebarHeader = (props: SidebarHeaderProps) => {
data-testid="app-sidebar-arrow-button-forward"
disabled={
props.router
? props.router.history.stack.length > 0 &&
? (props.router.history.stack.length > 0 &&
props.router.history.current ===
props.router.history.stack.length - 1
: false
props.router.history.stack.length - 1) ||
props.router.history.stack.length === 0
: true
}
onClick={() => {
props.router?.forward();
@ -57,7 +57,6 @@ export const SidebarHeader = (props: SidebarHeaderProps) => {
<ArrowRightSmallIcon />
</IconButton>
</div>
)}
</div>
);
};