Skip to content

Commit

Permalink
fix: no reset button on Playground (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuroUhlar authored Jul 15, 2024
1 parent abea4e7 commit ce1ada9
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions src/client/components/common/MobileNavbar/MobileNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,29 @@ interface MobileNavbarProps {
closeMobileMenu: () => void;
}
export default function MobileNavbar({ darkMode, closeMobileMenu }: MobileNavbarProps) {
const { mutate, isLoading: isResetLoading } = useReset({});
const { mutate, isLoading: isResetLoading, shouldDisplayResetButton } = useReset({});

return (
<nav className={classNames(styles.nav, { [styles.darkNavHeader]: darkMode })}>
<div className={styles.container}>
<div className={classNames(styles.links, styles.top)}>
<Button
className={classNames(styles.resetButton, isResetLoading && styles.loading)}
onClick={() => mutate()}
variant='primary'
outlined
disabled={isResetLoading}
size={'medium'}
title='Click Restart to remove all information obtained from this browser. This will reenable some scenarios for you if you were locked out of a specific action.'
buttonId='click_top_nav_restart'
data-testid={TEST_IDS.reset.resetButton}
>
Restart
<Image src={Restart} alt='Restart button' />
</Button>
</div>
{shouldDisplayResetButton ? (
<div className={classNames(styles.links, styles.top)}>
<Button
className={classNames(styles.resetButton, isResetLoading && styles.loading)}
onClick={() => mutate()}
variant='primary'
outlined
disabled={isResetLoading}
size={'medium'}
title='Click Restart to remove all information obtained from this browser. This will reenable some scenarios for you if you were locked out of a specific action.'
buttonId='click_top_nav_restart'
data-testid={TEST_IDS.reset.resetButton}
>
Restart
<Image src={Restart} alt='Restart button' />
</Button>
</div>
) : null}
<div className={classNames(styles.links, styles.top)}>
<Button
href={URL.contactSales}
Expand Down

0 comments on commit ce1ada9

Please sign in to comment.