Skip to content

Commit

Permalink
fix(application): 🐛 Sort application questions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nudelsuppe42 committed Dec 29, 2023
1 parent 5183cc1 commit eb3cecd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/pages/teams/[team]/apply.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ const Apply: NextPage = ({ data, buildteam }: any) => {
},
}}
>
<div dangerouslySetInnerHTML={{ __html: sanitize(buildteam?.about) }} />
<div
dangerouslySetInnerHTML={{ __html: sanitize(buildteam?.about) }}
style={{ marginBottom: 'var(--mantine-spacing-md)' }}
/>
{!pastApplications || typeof pastApplications == 'string' ? (
<>
<Skeleton height={50} my={'md'} />
Expand Down Expand Up @@ -134,6 +137,7 @@ const Apply: NextPage = ({ data, buildteam }: any) => {
)}
{data
?.filter((d: any) => d.trial == trial)
.sort((a: any, b: any) => a.sort - b.sort)
.map((d: any, i: number) => {
const Question = ApplicationQuestions[d.type];
return (
Expand Down
4 changes: 3 additions & 1 deletion src/pages/teams/[team]/manage/review/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ const Apply: NextPage = ({ team, id }: any) => {
<Grid>
<Grid.Col span={{ md: 6 }} pr="lg">
<h2>Answers</h2>
{data?.ApplicationAnswer?.map((a: any, i: number) => {
{data?.ApplicationAnswer?.sort(
(a: any, b: any) => a.question.sort - b.question.sort,
).map((a: any, i: number) => {
const d = a.question;
const Question = ApplicationQuestions[d.type];
return (
Expand Down

0 comments on commit eb3cecd

Please sign in to comment.