feat: improved TopBar and empty registration page

This commit is contained in:
2025-07-21 08:27:35 +05:00
parent e018aec8db
commit 3d78d3e279
4 changed files with 10 additions and 4 deletions

View File

@ -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',