-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
100 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,30 @@ | ||
.notFound { | ||
width: 100%; | ||
@include flex-column-center; | ||
width: 100%; | ||
} | ||
|
||
.title { | ||
@include mp-null; | ||
@include use-font(38px, 46px, 500); | ||
@include use-font(38px, 45.6px, 500); | ||
margin: 164px auto 56px; | ||
} | ||
|
||
.text { | ||
@include mp-null; | ||
@include use-font(24px, 28.8px, 500); | ||
margin-bottom: 48px; | ||
} | ||
|
||
.button { | ||
@include use-font; | ||
border-radius: $border-radius-s!important; | ||
border: none; | ||
outline: none; | ||
padding: 10.5px 16px; | ||
width: 181px; | ||
height: 40px; | ||
box-shadow: $items-shadow; | ||
background: $button; | ||
color: $main-white; | ||
text-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
import { Button } from 'antd/es/radio'; | ||
import { Link } from 'react-router-dom'; | ||
import styles from 'src/pages/NotFound/NotFound.module.scss'; | ||
|
||
export default function NotFound() { | ||
return ( | ||
<div className={styles.notFound}> | ||
<p className={styles.title}>Страница не найдена</p> | ||
<p className={styles.title}>404 Ошибка</p> | ||
<p className={styles.text}>Страница, которую вы ищете, не существует</p> | ||
<Link to='./' className={styles.link}> | ||
<Button className={styles.button}>На главную</Button> | ||
</Link> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
type RequestOptionsType = RequestInit & { | ||
headers: Record<string, string> | ||
} | ||
|
||
export const BASE_URL = 'https://sagaart5.hopto.org/api/v1' | ||
|
||
export const checkResponse = (response: Response) => { | ||
if (response.ok) { | ||
return response.json() | ||
} | ||
return response | ||
.json() | ||
.then(response => Promise.reject(`Ошибка ${response.status}`)) | ||
} | ||
|
||
const request = (endpoint: string, options?: RequestOptionsType) => | ||
fetch(`${BASE_URL}${endpoint}`, options).then(checkResponse) | ||
|
||
export const getEventsData = async () => await request('/events') | ||
export const getArtsData = async (limit?: number) => | ||
await request(`/arts${limit ? `/?limit=${limit}` : ''}`) | ||
export const getPopularArts = async () => await request('/arts/most_popular') | ||
export const getArtById = async (id: number) => await request(`/arts/${id}`) | ||
export const getSearchFields = async () => | ||
await request('/arts/art_search_fields') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters