diff --git a/src/pages/AboutPage.tsx b/src/pages/AboutPage.tsx index 0476af9b8c57cb0d093285888b12fc6b66aee278..1e16a5a3d4f6983fcdfbb375ca2f89816c9bad6a 100644 --- a/src/pages/AboutPage.tsx +++ b/src/pages/AboutPage.tsx @@ -9,10 +9,6 @@ import Page from './Page'; const AboutPage: React.FC = () => { const { data, status } = useGetStaff(); - if (!data || status === 'loading') { - return <CircularProgress />; - } - return ( <Page> <Box display="flex" flexDirection="column" alignItems="center" padding={3}> @@ -30,16 +26,20 @@ const AboutPage: React.FC = () => { </Typography> </Box> <Box marginBottom={8} display="flex" justifyContent="center" flexWrap="wrap"> - {data?.map((m) => ( - <Box m={3} key={m.email}> - <MemberCard - name={m.name} - email={m.email} - acceptedPicture={m.acceptedPicture} - staffMemberText={m.staffMemberText} - /> - </Box> - ))} + {!data || status === 'loading' ? ( + <CircularProgress /> + ) : ( + data?.map((m) => ( + <Box m={3} key={m.email}> + <MemberCard + name={m.name} + email={m.email} + acceptedPicture={m.acceptedPicture} + staffMemberText={m.staffMemberText} + /> + </Box> + )) + )} </Box> <Box marginY={4}> <Typography variant="h4" color="textPrimary"> diff --git a/src/setupProxy.js b/src/setupProxy.js index 971e3679702d6223d3a9cb4534c0a84612fae486..94fbbe63954146a9b348e5a1405a4a2ff4897e08 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -4,7 +4,7 @@ module.exports = function (app) { app.use( '/api/v1', createProxyMiddleware({ - target: 'https://body-dev.maze.sch.bme.hu/dev', + target: process.env.REACT_APP_PROXY_TARGET, changeOrigin: true, }), );