mirror of
https://github.com/hubHarmony/servii-frontend.git
synced 2024-11-18 05:40:31 +00:00
ajout route creation serveur java
This commit is contained in:
parent
08b566c35f
commit
e18b9af60e
@ -10,6 +10,7 @@ import styles from './App.module.scss';
|
|||||||
import Loading from './pages/Loading/loading';
|
import Loading from './pages/Loading/loading';
|
||||||
import NotFoundPage from './pages/NotFoundPage/NotFoundPage';
|
import NotFoundPage from './pages/NotFoundPage/NotFoundPage';
|
||||||
import CreatePage from './pages/CreateServer/CreateServer';
|
import CreatePage from './pages/CreateServer/CreateServer';
|
||||||
|
import Javapick from './pages/CreateServer/Javapick/java';
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
const [user, setUser] = useState(null);
|
const [user, setUser] = useState(null);
|
||||||
@ -35,6 +36,7 @@ const App = () => {
|
|||||||
<Route path="/login" element={user ? <Navigate to="/dashboard" /> : <LoginPage />} />
|
<Route path="/login" element={user ? <Navigate to="/dashboard" /> : <LoginPage />} />
|
||||||
<Route path="/dashboard" element={user ? <DashboardPage user={user} /> : <Navigate to="/login" />} />
|
<Route path="/dashboard" element={user ? <DashboardPage user={user} /> : <Navigate to="/login" />} />
|
||||||
<Route path="/createServer" element={user ? <CreatePage user={user} /> : <Navigate to="/login" />} />
|
<Route path="/createServer" element={user ? <CreatePage user={user} /> : <Navigate to="/login" />} />
|
||||||
|
<Route path="/createServer/java" element={user ? <Javapick user={user} /> : <Navigate to="/login" />} />
|
||||||
<Route path="/server/:serverName/*" element={user ? <ServerDetails user={user} /> : <Navigate to="/login" />} />
|
<Route path="/server/:serverName/*" element={user ? <ServerDetails user={user} /> : <Navigate to="/login" />} />
|
||||||
<Route path="/" element={<Navigate to={user ? "/dashboard" : "/login"} />} />
|
<Route path="/" element={<Navigate to={user ? "/dashboard" : "/login"} />} />
|
||||||
<Route path="*" element={<NotFoundPage />} />
|
<Route path="*" element={<NotFoundPage />} />
|
||||||
|
@ -20,7 +20,7 @@ const CreateServer = ({ user }) => {
|
|||||||
<div className={styles.title}>Création du serveur</div>
|
<div className={styles.title}>Création du serveur</div>
|
||||||
<div className={styles.subtitle}>De quels façon voulez-vous jouer ?</div>
|
<div className={styles.subtitle}>De quels façon voulez-vous jouer ?</div>
|
||||||
<div className={styles.GamesContainer}>
|
<div className={styles.GamesContainer}>
|
||||||
<div className={styles.GameCard}>
|
<div className={styles.GameCard} onClick={() => navigate('/dashboard')}>
|
||||||
<img src="http://fakeimg.pl/250x150/"/>
|
<img src="http://fakeimg.pl/250x150/"/>
|
||||||
<div className={styles.Gamesubtitle}>Java Edition</div>
|
<div className={styles.Gamesubtitle}>Java Edition</div>
|
||||||
<div className={styles.Gamedescription}>Lorem ipsum dolor sit, amet consectetur adipisiciiquid, do</div>
|
<div className={styles.Gamedescription}>Lorem ipsum dolor sit, amet consectetur adipisiciiquid, do</div>
|
||||||
|
41
src/pages/CreateServer/Javapick/java.jsx
Normal file
41
src/pages/CreateServer/Javapick/java.jsx
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import styles from './java.module.scss';
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
import Navbar from '../../../components/navbar/Navbar';
|
||||||
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
|
const Javapick = ({ user }) => {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={styles.Container}>
|
||||||
|
<Navbar
|
||||||
|
user={user}
|
||||||
|
hasShadow={true}
|
||||||
|
showBackButton={false}
|
||||||
|
onBackClick={() => navigate('/dashboard')}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div className={styles.hey}>
|
||||||
|
<h1>hello java</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
Javapick.propTypes = {
|
||||||
|
user: PropTypes.oneOfType([
|
||||||
|
PropTypes.shape({
|
||||||
|
uid: PropTypes.string.isRequired,
|
||||||
|
displayName: PropTypes.string,
|
||||||
|
email: PropTypes.string,
|
||||||
|
photoURL: PropTypes.string,
|
||||||
|
}),
|
||||||
|
]),
|
||||||
|
onCreateServer: PropTypes.func.isRequired,
|
||||||
|
onSubdomainUpdate: PropTypes.func.isRequired,
|
||||||
|
onCancel: PropTypes.func,
|
||||||
|
noServers: PropTypes.any
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Javapick;
|
3
src/pages/CreateServer/Javapick/java.module.scss
Normal file
3
src/pages/CreateServer/Javapick/java.module.scss
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.hey{
|
||||||
|
margin-top: 15rem;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user