Skip to content

Commit

Permalink
update types
Browse files Browse the repository at this point in the history
  • Loading branch information
owlester12 committed Sep 27, 2024
1 parent 3b71f93 commit 39f74f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
5 changes: 1 addition & 4 deletions frontend/components/Applications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,8 @@ ApplicationsPage.getInitialProps = async (ctx: NextPageContext) => {
ctx,
)) as BulkResp

const returner = {
whartonApplications: data.whartonapplications,
}
return {
...returner,
whartonApplications: data.whartonapplications,
fair: ctx.query.fair != null ? parseInt(ctx.query.fair as string) : null,
}
}
Expand Down
10 changes: 3 additions & 7 deletions frontend/pages/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React, { ReactNode } from 'react'
import { toast, TypeOptions } from 'react-toastify'
import renderPage from 'renderPage'
import styled from 'styled-components'
import { ApplicationSubmission, UserInfo } from 'types'
import { Application, ApplicationSubmission, UserInfo } from 'types'
import { OBJECT_NAME_TITLE, SHOW_MEMBERSHIP_REQUEST } from 'utils/branding'

import ApplicationsPage from '~/components/Applications'
Expand Down Expand Up @@ -125,7 +125,7 @@ const Settings = ({
}

type BulkResp = {
whartonapplications: any
whartonapplications: Application[]
submissions: Array<ApplicationSubmission>
}

Expand All @@ -135,13 +135,9 @@ Settings.getInitialProps = async (ctx: NextPageContext) => {
ctx,
)) as BulkResp

const returner = {
return {
whartonApplications: data.whartonapplications,
submissions: data.submissions,
}

return {
...returner,
fair: ctx.query.fair != null ? parseInt(ctx.query.fair as string) : null,
}
}
Expand Down

0 comments on commit 39f74f8

Please sign in to comment.