backend for queues & minor front tweaks

This commit is contained in:
2024-04-11 16:39:08 +03:00
parent 8b8124d58d
commit 57965fc147
21 changed files with 210 additions and 35 deletions

View File

@ -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;

View 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;

View File

@ -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>

View File

@ -14,7 +14,7 @@
}
.image {
height: 10vw;
height: 100px;
width: auto;
}