This repository has been archived by the owner on Nov 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
apps/frontend/src/components/lastSection/_lastSection.sass
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,28 @@ | ||
@use "~/sass/star4" | ||
|
||
.last-section | ||
display: flex | ||
flex-direction: column | ||
text-align: center | ||
margin-top: 5rem | ||
@include star4.layout(compact, compact) | ||
margin-top: 10rem | ||
&__container | ||
border: solid .1rem black | ||
border-radius: 3rem | ||
padding: 1rem | ||
margin-bottom: 3rem | ||
&__p | ||
font-size: 1rem | ||
@include star4.layout(compact, compact) | ||
font-size: 1.3rem | ||
line-height: 130% | ||
@include star4.typescale(body, large) | ||
&__h2 | ||
font-size: 1.5rem | ||
text-align: center | ||
margin-bottom: 5rem | ||
@include star4.typescale(headline, medium) | ||
@include star4.layout(compact, compact) | ||
font-size: 1.5rem | ||
line-height: 130% |
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,33 @@ | ||
import { useStableCallback } from "@tanstack/react-router"; | ||
import { memo, useEffect, useState } from "react"; | ||
import "./_lastSection.sass"; | ||
|
||
const LastSectionComponent = function LastSection() { | ||
const [data, setData] = useState(null); | ||
useEffect(() => { | ||
async function fetchData() { | ||
return await fetch("http://localhost:5000/event"); | ||
} | ||
setData( | ||
fetchData().map((text) => { | ||
return ( | ||
<div className="last-section__container"> | ||
<p className="last-section__p">{text}</p> | ||
</div> | ||
); | ||
}), | ||
); | ||
}, []); | ||
return ( | ||
<> | ||
<section className="last-section"> | ||
<h2 className="last-section__h2"> | ||
Здесь будут представлены ваши ошибки | ||
</h2> | ||
{data} | ||
</section> | ||
</> | ||
); | ||
}; | ||
|
||
export const LastSection = memo(LastSectionComponent); |