feat: improved TopBar and empty registration page
This commit is contained in:
@ -30,6 +30,7 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
|
||||
const isLoginPage = location.pathname === '/login';
|
||||
const isLaunchPage = location.pathname.startsWith('/launch');
|
||||
const isVersionsExplorerPage = location.pathname.startsWith('/');
|
||||
const isRegistrationPage = location.pathname === '/registration';
|
||||
const navigate = useNavigate();
|
||||
const [coins, setCoins] = useState<number>(0);
|
||||
const [value, setValue] = useState(0);
|
||||
@ -118,7 +119,7 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
|
||||
marginLeft: '1vw',
|
||||
}}
|
||||
>
|
||||
{isLaunchPage && (
|
||||
{(isLaunchPage || isRegistrationPage) && (
|
||||
<Button
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
@ -136,7 +137,7 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
|
||||
<ArrowBackRoundedIcon />
|
||||
</Button>
|
||||
)}
|
||||
{!isLaunchPage && (
|
||||
{!isLaunchPage && !isRegistrationPage && !isLoginPage && (
|
||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
||||
<Tabs
|
||||
value={value}
|
||||
@ -251,7 +252,7 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
|
||||
<Button
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
onClick={() => onRegister && onRegister()}
|
||||
onClick={() => navigate('/registration')}
|
||||
sx={{
|
||||
width: '10em',
|
||||
height: '3em',
|
||||
|
||||
Reference in New Issue
Block a user