Skip to content

Commit

Permalink
Merge pull request #57 from yourssu/2024-2-recruit
Browse files Browse the repository at this point in the history
2024년도 2학기 리쿠르팅 작업 완료
  • Loading branch information
fecapark authored Sep 1, 2024
2 parents aae059a + 3a4da03 commit b86f5d2
Show file tree
Hide file tree
Showing 24 changed files with 14,596 additions and 20,377 deletions.
22 changes: 19 additions & 3 deletions gatsby-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ export const createPages: GatsbyNode['createPages'] = async ({
(edge) => edge.node.basicInformation.name,
);

const schedule =
const scheduleContainsAssignment =
queryAllSanityData.data?.allSanityRecruitingSchedule.edges[0].node
.applyProcedure;

const scheduleWithoutAssignment =
queryAllSanityData.data?.allSanityRecruitingSchedule.edges[
queryAllSanityData.data.allSanityRecruitingSchedule.edges.length - 1
].node.applyProcedure;
Expand All @@ -95,10 +99,22 @@ export const createPages: GatsbyNode['createPages'] = async ({
};
};
}) => {
const pathName = name.toLowerCase().replaceAll(' ', '_');
const teamNamesContainsAssignmentInSchedule = [
'backend_developer',
'product_designer',
];

const pageOptions = {
path: `recruiting/${name.toLowerCase().replaceAll(' ', '_')}`,
path: `recruiting/${pathName}`,
component: DescriptionTemplateComponent,
context: { name, nameList, schedule },
context: {
name,
nameList,
schedule: teamNamesContainsAssignmentInSchedule.includes(pathName)
? scheduleContainsAssignment
: scheduleWithoutAssignment,
},
};

createPage(pageOptions);
Expand Down
Loading

0 comments on commit b86f5d2

Please sign in to comment.