backend for queues & minor front tweaks
This commit is contained in:
@ -1,19 +1,25 @@
|
||||
import React from "react";
|
||||
import React, { ReactNode } from "react";
|
||||
import { BrowserRouter, Route, Routes } from "react-router-dom";
|
||||
import MainPage from "./MainPage";
|
||||
import { getLocalToken, loadLanguage, store } from "../config/store";
|
||||
import DashboardPage from "./DashboardPage";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
const AppRoutes = () => {
|
||||
const AppRoutes = ({ children }: { children: ReactNode }) => {
|
||||
store.dispatch(getLocalToken());
|
||||
store.dispatch(loadLanguage());
|
||||
|
||||
return (
|
||||
<BrowserRouter>
|
||||
{children}
|
||||
<Routes>
|
||||
<Route path="/" Component={MainPage} />
|
||||
<Route path="/" element={<MainPage />} />
|
||||
<Route path="/dashboard" element={<DashboardPage />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
);
|
||||
};
|
||||
|
||||
AppRoutes.propTypes = {
|
||||
children: PropTypes.node,
|
||||
};
|
||||
export default AppRoutes;
|
||||
|
||||
22
frontend/app/src/pages/DashboardPage.tsx
Normal file
22
frontend/app/src/pages/DashboardPage.tsx
Normal file
@ -0,0 +1,22 @@
|
||||
import React from "react";
|
||||
import "./styles.css";
|
||||
import logoSquare from "../../static/logo-square.png";
|
||||
import { Button } from "antd";
|
||||
import tr from "../config/translation";
|
||||
|
||||
const DashboardPage = () => {
|
||||
return (
|
||||
<div className="card main">
|
||||
<img src={logoSquare} alt="logo" className="image" />
|
||||
<p style={{ fontSize: "2rem" }}>
|
||||
{tr("Queuing has never been so simple")}
|
||||
</p>
|
||||
<div className="button-box">
|
||||
<Button>{tr("Join a queue")}</Button>
|
||||
<Button>{tr("Take a tour")}</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DashboardPage;
|
||||
@ -1,13 +1,13 @@
|
||||
import React from "react";
|
||||
import "./styles.css";
|
||||
import logoSquare from "../../static/logo-square.png";
|
||||
import logo from "../../static/logo-full.png";
|
||||
import { Button } from "antd";
|
||||
import tr from "../config/translation";
|
||||
|
||||
const MainPage = () => {
|
||||
return (
|
||||
<div className="card main">
|
||||
<img src={logoSquare} alt="logo" className="image" />
|
||||
<img src={logo} alt="logo" className="image" />
|
||||
<p style={{ fontSize: "2rem" }}>
|
||||
{tr("Queuing has never been so simple")}
|
||||
</p>
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
}
|
||||
|
||||
.image {
|
||||
height: 10vw;
|
||||
height: 100px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user