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 Profile from './pages/Profile';
|
||||||
import Shop from './pages/Shop';
|
import Shop from './pages/Shop';
|
||||||
import Marketplace from './pages/Marketplace';
|
import Marketplace from './pages/Marketplace';
|
||||||
|
import { Registration } from './pages/Registration';
|
||||||
|
|
||||||
const AuthCheck = ({ children }: { children: ReactNode }) => {
|
const AuthCheck = ({ children }: { children: ReactNode }) => {
|
||||||
const [isAuthenticated, setIsAuthenticated] = useState<boolean | null>(null);
|
const [isAuthenticated, setIsAuthenticated] = useState<boolean | null>(null);
|
||||||
@ -127,6 +128,7 @@ const App = () => {
|
|||||||
<Notifier />
|
<Notifier />
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/login" element={<Login />} />
|
<Route path="/login" element={<Login />} />
|
||||||
|
<Route path="/registration" element={<Registration />} />
|
||||||
<Route
|
<Route
|
||||||
path="/"
|
path="/"
|
||||||
element={
|
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 {
|
export interface Player {
|
||||||
uuid: string;
|
uuid: string;
|
||||||
|
@ -30,6 +30,7 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
|
|||||||
const isLoginPage = location.pathname === '/login';
|
const isLoginPage = location.pathname === '/login';
|
||||||
const isLaunchPage = location.pathname.startsWith('/launch');
|
const isLaunchPage = location.pathname.startsWith('/launch');
|
||||||
const isVersionsExplorerPage = location.pathname.startsWith('/');
|
const isVersionsExplorerPage = location.pathname.startsWith('/');
|
||||||
|
const isRegistrationPage = location.pathname === '/registration';
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [coins, setCoins] = useState<number>(0);
|
const [coins, setCoins] = useState<number>(0);
|
||||||
const [value, setValue] = useState(0);
|
const [value, setValue] = useState(0);
|
||||||
@ -118,7 +119,7 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
|
|||||||
marginLeft: '1vw',
|
marginLeft: '1vw',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{isLaunchPage && (
|
{(isLaunchPage || isRegistrationPage) && (
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
color="primary"
|
color="primary"
|
||||||
@ -136,7 +137,7 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
|
|||||||
<ArrowBackRoundedIcon />
|
<ArrowBackRoundedIcon />
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{!isLaunchPage && (
|
{!isLaunchPage && !isRegistrationPage && !isLoginPage && (
|
||||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
||||||
<Tabs
|
<Tabs
|
||||||
value={value}
|
value={value}
|
||||||
@ -251,7 +252,7 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
|
|||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
color="primary"
|
color="primary"
|
||||||
onClick={() => onRegister && onRegister()}
|
onClick={() => navigate('/registration')}
|
||||||
sx={{
|
sx={{
|
||||||
width: '10em',
|
width: '10em',
|
||||||
height: '3em',
|
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