mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-04-21 11:20:17 -04:00
remove warnings
This commit is contained in:
parent
e475219769
commit
ef0e4ce745
|
@ -37,7 +37,7 @@ export default function Authenticator() {
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
setStatus('errored');
|
setStatus('errored');
|
||||||
});
|
});
|
||||||
}, [code, provider]);
|
}, [code, provider, refreshAuthState]);
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 'authenticated':
|
case 'authenticated':
|
||||||
|
|
|
@ -43,23 +43,30 @@ export default function Group() {
|
||||||
makeAPIGetCall('/group', { id }).then((res) => setGroup(res.data.data));
|
makeAPIGetCall('/group', { id }).then((res) => setGroup(res.data.data));
|
||||||
}, [id]);
|
}, [id]);
|
||||||
|
|
||||||
|
if (!group) {
|
||||||
|
return <h1 style={{ textAlign: 'center' }}>Loading</h1>;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ width: '100%', display: 'flex', flexDirection: 'column' }}>
|
<div
|
||||||
<Typography variant="h1">Group</Typography>
|
style={{
|
||||||
<h1
|
width: '100%',
|
||||||
className="d-flex justify-content-center p-4"
|
display: 'flex',
|
||||||
style={{ backgroundColor: '#F1EAE8', fontFamily: 'Impact' }}
|
flexDirection: 'column',
|
||||||
>
|
padding: '1rem',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography variant="h1" align="center">
|
||||||
|
Group {group.id}
|
||||||
|
</Typography>
|
||||||
|
|
||||||
|
<Typography variant="h3" align="center">
|
||||||
Pools
|
Pools
|
||||||
</h1>
|
</Typography>
|
||||||
<a
|
<a className="btn btn-large btn-success" href="/create_pool">
|
||||||
className="btn btn-large btn-success"
|
|
||||||
href="/create_pool"
|
|
||||||
style={{ fontFamily: 'Courier New' }}
|
|
||||||
>
|
|
||||||
Create Pool
|
Create Pool
|
||||||
</a>
|
</a>
|
||||||
<div className="container" style={{ fontFamily: 'Courier New' }}>
|
<div className="container">
|
||||||
<br></br>
|
<br></br>
|
||||||
{pools.map((pool, index) => {
|
{pools.map((pool, index) => {
|
||||||
let background;
|
let background;
|
||||||
|
|
|
@ -86,7 +86,7 @@ export default function Pool() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [user]);
|
}, [user, id, pool]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch(`${process.env.REACT_APP_API_ENDPOINT}/pool/${id}`)
|
fetch(`${process.env.REACT_APP_API_ENDPOINT}/pool/${id}`)
|
||||||
|
|
|
@ -19,60 +19,9 @@ const useStyles = makeStyles({
|
||||||
});
|
});
|
||||||
|
|
||||||
const Profile = () => {
|
const Profile = () => {
|
||||||
const { user, isLoggedIn } = useContext(AuthenticationContext);
|
const { user } = useContext(AuthenticationContext);
|
||||||
const [groups, setGroups] = useState<Carpool.Group[]>([]);
|
// const [groups, setGroups] = useState<Carpool.Group[]>([]);
|
||||||
const [pools, setPools] = useState<Carpool.Pool[]>([
|
const [pools, setPools] = useState<Carpool.Pool[]>([]);
|
||||||
/*
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
pool_title: 'TJ Carpool',
|
|
||||||
pool_text: 'Carpool from TJ track to homes',
|
|
||||||
start_time: '4/10/2021 3:00 PM',
|
|
||||||
end_time: '4/10/2021 4:00 PM',
|
|
||||||
capacity: 2,
|
|
||||||
participants: [],
|
|
||||||
comments: [
|
|
||||||
'What is the covid vaccination status of all the participants?',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
pool_title: 'TJ Carpool',
|
|
||||||
pool_text: 'Carpool from TJ track to homes',
|
|
||||||
start_time: '4/10/2021 3:00 PM',
|
|
||||||
end_time: '4/10/2021 4:00 PM',
|
|
||||||
capacity: 2,
|
|
||||||
participants: [],
|
|
||||||
comments: [
|
|
||||||
'What is the covid vaccination status of all the participants?',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
pool_title: 'TJ Carpool',
|
|
||||||
pool_text: 'Carpool from TJ track to homes',
|
|
||||||
start_time: '4/10/2021 3:00 PM',
|
|
||||||
end_time: '4/10/2021 4:00 PM',
|
|
||||||
capacity: 2,
|
|
||||||
participants: [],
|
|
||||||
comments: [
|
|
||||||
'What is the covid vaccination status of all the participants?',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
pool_title: 'TJ Carpool',
|
|
||||||
pool_text: 'Carpool from TJ track to homes',
|
|
||||||
start_time: '4/10/2021 3:00 PM',
|
|
||||||
end_time: '4/10/2021 4:00 PM',
|
|
||||||
capacity: 2,
|
|
||||||
participants: [],
|
|
||||||
comments: [
|
|
||||||
'What is the covid vaccination status of all the participants?',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
*/
|
|
||||||
]);
|
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user