Merge pull request #18 from gractwo/persons-of-note-endpoint

adapt site to /persons-of-note endpoint change
This commit is contained in:
AdamCala
2023-01-03 11:33:41 +01:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -23,7 +23,7 @@ const PageInfo = () => {
setFunFact("Genezą nazwy Gractwa jest złączenie słów „Gracz” i „Bractwo”."); setFunFact("Genezą nazwy Gractwa jest złączenie słów „Gracz” i „Bractwo”.");
} }
useEffect(() => { useEffect(() => {
fetch("https://gractwo.pl/api/v1/admincards") fetch("https://gractwo.pl/api/v1/persons-of-note")
.then((res) => { .then((res) => {
return res.json(); return res.json();
}) })
@@ -95,7 +95,7 @@ const PageInfo = () => {
<div className={styles.persons}> <div className={styles.persons}>
{personsList {personsList
.filter((el: apiResType) => { .filter((el: apiResType) => {
return !el.IsAdmin; return el.IsAdmin;
}) })
.map((el: apiResType) => { .map((el: apiResType) => {
return ( return (
@@ -123,7 +123,7 @@ const PageInfo = () => {
})} })}
</div> </div>
</main> </main>
{/* <main id="osoby-godne-uwagi"> <main id="osoby-godne-uwagi">
<h2>osoby godne uwagi</h2> <h2>osoby godne uwagi</h2>
<div className={styles.persons}> <div className={styles.persons}>
{personsList {personsList
@@ -155,7 +155,7 @@ const PageInfo = () => {
); );
})} })}
</div> </div>
</main> */} </main>
<main id="linki"> <main id="linki">
<h2>linki i przekierowania</h2> <h2>linki i przekierowania</h2>
<div className="chips"> <div className="chips">

View File

@@ -18,7 +18,7 @@ const ProfilePage = () => {
const [persons, setPersons] = useState([]); const [persons, setPersons] = useState([]);
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
useEffect(() => { useEffect(() => {
fetch("https://gractwo.pl/api/v1/admincards") fetch("https://gractwo.pl/api/v1/persons-of-note")
.then((res) => { .then((res) => {
return res.json(); return res.json();
}) })