Skip to content

Commit

Permalink
fixed Nits
Browse files Browse the repository at this point in the history
  • Loading branch information
owlester12 committed Sep 8, 2024
1 parent b98818f commit 0cf8f46
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
20 changes: 13 additions & 7 deletions frontend/components/Applications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,20 @@ const AppsContainer = styled.div`
min-height: 60vh;
`

function ApplicationsPage({ whartonapplications }): ReactElement {
if ('detail' in whartonapplications) {
return <Text>{whartonapplications.detail}</Text>
function ApplicationsPage({ whartonApplications }): ReactElement {
if ('detail' in whartonApplications) {
return <Text>{whartonApplications.detail}</Text>
}

return (
<AppsContainer>
<div className="columns is-multiline is-desktop is-tablet">
{whartonapplications != null && whartonapplications.length > 0 ? (
{whartonApplications != null && whartonApplications.length > 0 ? (
<div>
<Text>Only Wharton applications displayed here!</Text>
{whartonapplications.map((application) => (
<Text>
Note: only current Wharton applications are displayed on this page{' '}
</Text>
{whartonApplications.map((application) => (
<CardWrapper className={'column is-half-desktop'}>
<Link href={application.external_url} target="_blank">
<Card className="card">
Expand Down Expand Up @@ -156,8 +158,12 @@ ApplicationsPage.getInitialProps = async (ctx: NextPageContext) => {
['whartonapplications'],
ctx,
)) as BulkResp

const returner = {
whartonApplications: data.whartonapplications,
}
return {
...data,
...returner,
fair: ctx.query.fair != null ? parseInt(ctx.query.fair as string) : null,
}
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/pages/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const Settings = ({
{
name: 'applications',
label: 'Applications',
content: <ApplicationsPage whartonapplications={whartonApplications} />,
content: <ApplicationsPage whartonApplications={whartonApplications} />,
},
{
name: 'Requests',
Expand Down

0 comments on commit 0cf8f46

Please sign in to comment.