mirror of
https://github.com/tjsga/tj-sga-website-react.git
synced 2025-04-17 18:30:17 -04:00
Cleaned up code
This commit is contained in:
parent
a21cf6cd80
commit
5ee5d07f27
|
@ -1,10 +1,8 @@
|
|||
import React from 'react';
|
||||
|
||||
const NotFoundPage = () => (
|
||||
export default function NotFoundPage() {
|
||||
return (
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
<h1>404: Not Found</h1>
|
||||
<p>This page wasn't found...</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
export default NotFoundPage;
|
||||
}
|
||||
|
|
|
@ -8,14 +8,11 @@ export default function ClassCouncil() {
|
|||
`*[_type == 'member' && role == 'class'] | order (year desc)`
|
||||
);
|
||||
|
||||
if (!members) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Hero heading='Class Council' />
|
||||
{members.map((member) => {
|
||||
{members &&
|
||||
members.map((member) => {
|
||||
return <MemberRow key={member._id} member={member}></MemberRow>;
|
||||
})}
|
||||
</>
|
||||
|
|
|
@ -9,15 +9,12 @@ export default function Committee() {
|
|||
);
|
||||
// year desc because seniority 8)
|
||||
|
||||
if (!excomm) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Hero heading='Executive Committee' />
|
||||
<div>
|
||||
{excomm.map((member) => {
|
||||
{excomm &&
|
||||
excomm.map((member) => {
|
||||
return <MemberRow member={member} />;
|
||||
})}
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@ import Hero from '../components/Hero';
|
|||
import NewsAndMission from '../components/NewsAndMission';
|
||||
import SegmentGroup from '../components/SegmentGroup';
|
||||
|
||||
const IndexPage = () => {
|
||||
export default function IndexPage() {
|
||||
return (
|
||||
<>
|
||||
{/* Hero image */}
|
||||
|
@ -20,6 +20,4 @@ const IndexPage = () => {
|
|||
<NewsAndMission />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default IndexPage;
|
||||
}
|
||||
|
|
|
@ -8,15 +8,11 @@ export default function Initiatives() {
|
|||
'*[_type == "initiative"]'
|
||||
);
|
||||
|
||||
if (!initiatives) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Hero heading='Initiatives'></Hero>
|
||||
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
||||
{initiatives.map((initiative) => {
|
||||
{initiatives && initiatives.map((initiative) => {
|
||||
return <InitiativeRow initiative={initiative} />;
|
||||
})}
|
||||
</div>
|
||||
|
|
|
@ -6,19 +6,18 @@ import '../css/mission.css';
|
|||
export default function Mission() {
|
||||
let mission = useMission();
|
||||
|
||||
if (!mission) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Hero heading='Mission and History' />
|
||||
{mission ? (
|
||||
<div>
|
||||
<div className='mission-quote'>
|
||||
<span className='mission-quote-text'>“{mission.quote_text}”</span>
|
||||
<br />
|
||||
<br />
|
||||
<span className='mission-quote-author'>— {mission.quote_author}</span>
|
||||
<span className='mission-quote-author'>
|
||||
— {mission.quote_author}
|
||||
</span>
|
||||
</div>
|
||||
<div className='row'>
|
||||
<div className='flex-1'>
|
||||
|
@ -46,6 +45,7 @@ export default function Mission() {
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -16,9 +16,11 @@ export default function Officers() {
|
|||
<>
|
||||
<Hero heading='Officers' />
|
||||
<div>
|
||||
{officers.map((officer) => {
|
||||
{officers
|
||||
? officers.map((officer) => {
|
||||
return <MemberRow member={officer} />;
|
||||
})}
|
||||
})
|
||||
: null}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user