add: skin viewer, refatoring to api

This commit is contained in:
2025-07-18 18:29:34 +05:00
parent f3aa32a60a
commit ec54219192
10 changed files with 704 additions and 33 deletions

View File

@ -14,6 +14,8 @@ import { Box } from '@mui/material';
import MinecraftBackground from './components/MinecraftBackground';
import { Notifier } from './components/Notifier';
import { VersionsExplorer } from './pages/VersionsExplorer';
import Profile from './pages/Profile';
import Shop from './pages/Shop';
const AuthCheck = ({ children }: { children: ReactNode }) => {
const [isAuthenticated, setIsAuthenticated] = useState<boolean | null>(null);
@ -120,7 +122,7 @@ const App = () => {
}}
>
<MinecraftBackground />
<TopBar onRegister={handleRegister} username={username} />
<TopBar onRegister={handleRegister} username={username || ''} />
<Notifier />
<Routes>
<Route path="/login" element={<Login />} />
@ -140,6 +142,22 @@ const App = () => {
</AuthCheck>
}
/>
<Route
path="/profile"
element={
<AuthCheck>
<Profile />
</AuthCheck>
}
/>
<Route
path="/shop"
element={
<AuthCheck>
<Shop />
</AuthCheck>
}
/>
</Routes>
</Box>
</Router>