move a bunch of files around

This commit is contained in:
Spectralitree
2021-06-26 19:51:14 +02:00
parent 9323985c8d
commit c1de266b2d
13 changed files with 32 additions and 32 deletions

27
src/Pages/ProfilePages.js Normal file
View File

@@ -0,0 +1,27 @@
import React, { useEffect } from 'react';
import * as BS from 'react-bootstrap';
import { useParams } from "react-router-dom";
import ProfilePage from '../Components/Public/ProfilePage.js'
export default function MemberPages(props) {
const { memberID } = useParams();
const memberpages = props.members.filter((member) => member.id === memberID)
const memberpage = memberpages.map((member) => <ProfilePage key={member.id} member={member}/>)
const noMatch = memberpages.length === 0;
useEffect (() => {
if (memberpages.length === 0) {
}
}, [memberpages])
if (noMatch) return (
<BS.Alert variant="danger">This system does not have a member with the ID '{memberID}', or the member's visibility is set to private.</BS.Alert>
)
return (
<>
{memberpage}
</>
)
}