Added authorization
This commit is contained in:
@ -54,7 +54,7 @@ const Login: React.FC = () => {
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit(resetError, setUserState, gotError, router)}>
|
||||
<input type="email" name="email" id="email" />
|
||||
<input type="username" name="username" id="username" />
|
||||
<input type="password" name="password" id="password" autoComplete="on" />
|
||||
<input type="submit" />
|
||||
{error.has ? <ErrorMessage message={error.message} /> : ""}
|
||||
|
@ -1,15 +1,12 @@
|
||||
import React from "react";
|
||||
|
||||
import { IRouteCard } from "types/user";
|
||||
import { formatTimeLength } from "utils";
|
||||
|
||||
const RouteCard: React.FC<IRouteCard> = ({ route }) => {
|
||||
return (
|
||||
<div>
|
||||
<h2>{route.name}</h2>
|
||||
<p>
|
||||
Данный квесты вы сможете пройти за {formatTimeLength(route.averageTime)}
|
||||
</p>
|
||||
<h3>{route.name}</h3>
|
||||
<p>{route.description}</p>
|
||||
<p>Длинна маршрута: {route.length} м</p>
|
||||
<p>Примерное время прохождения: {route.averageTime}</p>
|
||||
<p>Точка старта:</p>
|
||||
|
@ -7,7 +7,7 @@ import styles from "styles/RouteView.module.css";
|
||||
const RouteView: React.FC<IRouteView> = ({ header, routes }) => {
|
||||
return (
|
||||
<>
|
||||
<h1 className={styles.header}>{header}</h1>
|
||||
<h2 className={styles.header}>{header}</h2>
|
||||
{routes.map((route) => (
|
||||
<RouteCard key={route.id} route={route} />
|
||||
))}
|
||||
|
Reference in New Issue
Block a user