feat: improved TopBar and empty registration page
This commit is contained in:
@ -17,6 +17,7 @@ import { VersionsExplorer } from './pages/VersionsExplorer';
|
||||
import Profile from './pages/Profile';
|
||||
import Shop from './pages/Shop';
|
||||
import Marketplace from './pages/Marketplace';
|
||||
import { Registration } from './pages/Registration';
|
||||
|
||||
const AuthCheck = ({ children }: { children: ReactNode }) => {
|
||||
const [isAuthenticated, setIsAuthenticated] = useState<boolean | null>(null);
|
||||
@ -127,6 +128,7 @@ const App = () => {
|
||||
<Notifier />
|
||||
<Routes>
|
||||
<Route path="/login" element={<Login />} />
|
||||
<Route path="/registration" element={<Registration />} />
|
||||
<Route
|
||||
path="/"
|
||||
element={
|
||||
|
@ -1,4 +1,4 @@
|
||||
export const API_BASE_URL = 'http://147.78.65.214:8000';
|
||||
export const API_BASE_URL = 'https://minecraft.api.popa-popa.ru';
|
||||
|
||||
export interface Player {
|
||||
uuid: string;
|
||||
|
@ -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',
|
||||
|
3
src/renderer/pages/Registration.tsx
Normal file
3
src/renderer/pages/Registration.tsx
Normal file
@ -0,0 +1,3 @@
|
||||
export const Registration = () => {
|
||||
return <div>Registration</div>;
|
||||
};
|
Reference in New Issue
Block a user