Skip to content
This repository has been archived by the owner on Nov 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'lastSection'
Browse files Browse the repository at this point in the history
  • Loading branch information
deminearchiver committed Nov 24, 2024
2 parents 2fbbf1a + f8f0c09 commit b4e1899
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
28 changes: 28 additions & 0 deletions apps/frontend/src/components/lastSection/_lastSection.sass
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%
33 changes: 33 additions & 0 deletions apps/frontend/src/components/lastSection/lastSection.jsx
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);

0 comments on commit b4e1899

Please sign in to comment.