mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 04:49:45 +00:00
30 lines
752 B
React
Executable File
30 lines
752 B
React
Executable File
import { HashLink } from "react-router-hash-link";
|
|
import { useState, useEffect } from "react";
|
|
|
|
import { PagePost } from "../components";
|
|
import { getPosts } from "../../api";
|
|
|
|
function AboutUs() {
|
|
const [post, setPost] = useState();
|
|
|
|
useEffect(() => {
|
|
const loadData = async () => {
|
|
const newPost = await getPosts('aboutus');
|
|
setPost(newPost[0]);
|
|
console.log('aboutUs post', newPost[0]);
|
|
};
|
|
loadData();
|
|
}, []);
|
|
|
|
return (
|
|
<>
|
|
{typeof post !== 'undefined' &&
|
|
<PagePost post={post} >
|
|
<div className="btn">Показать еще</div>
|
|
</PagePost>
|
|
}
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default AboutUs; |