remove unused useEffect hook
This commit is contained in:
parent
7c3bd6eaec
commit
3fea63302d
@ -1,4 +1,4 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import React from 'react';
|
||||
import * as BS from 'react-bootstrap';
|
||||
import { useParams } from "react-router-dom";
|
||||
import MemberPage from '../Components/Private/MemberPage.js'
|
||||
@ -11,11 +11,6 @@ export default function MemberPages(props) {
|
||||
const memberpage = memberpages.map((member) => <MemberPage key={member.id} member={member} edit={props.edit}/>)
|
||||
const noMatch = memberpages.length === 0;
|
||||
|
||||
useEffect (() => {
|
||||
if (memberpages.length === 0) {
|
||||
}
|
||||
}, [memberpages])
|
||||
|
||||
if (noMatch) return (
|
||||
<BS.Alert variant="danger">You do not have a member with the ID '{memberID}' in your system. Please check the ID again.</BS.Alert>
|
||||
)
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import React from 'react';
|
||||
import * as BS from 'react-bootstrap';
|
||||
import { useParams } from "react-router-dom";
|
||||
import ProfilePage from '../Components/Public/ProfilePage.js'
|
||||
@ -7,14 +7,9 @@ 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 memberpage = memberpages.map((member) => <ProfilePage key={member.id} member={member} list={true}/>)
|
||||
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>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user