Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #9 from prince-deriv/job-description-page
Browse files Browse the repository at this point in the history
Prince/ add dynamic page for job-description
  • Loading branch information
prince-deriv authored Jun 6, 2022
2 parents bd6a238 + 6638159 commit ce43586
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
/* eslint-disable import/order */
const path = require('path')

exports.onCreatePage = () => {}
exports.onCreatePage = async ({ page, actions }) => {
const { createPage } = actions

if (page.path.match(/^\/job-description/)) {
page.matchPath = '/job-description/*'

// Update the page.
createPage(page)
}
}

const StylelintPlugin = require('stylelint-webpack-plugin')
const TerserPlugin = require('terser-webpack-plugin')
Expand Down
13 changes: 13 additions & 0 deletions src/pages/job-description/[id].tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as React from 'react'
import type { PageProps } from 'gatsby'
import Layout from 'common/components/layout/layout'

const JobDescription = (props: PageProps) => {
return (
<Layout>
<>{props.params.id}</>
</Layout>
)
}

export default JobDescription

0 comments on commit ce43586

Please sign in to comment.