Skip to content

Commit

Permalink
chore: remove single use variables
Browse files Browse the repository at this point in the history
  • Loading branch information
hollandjg committed Oct 10, 2023
1 parent abc0125 commit aa20304
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions packages/gatsby-theme-project-portal/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@ const {
contactTypeDefs,
pageTypeDefs,
} = require(`./utils/types`)
const CardPageTemplate = require.resolve(`./src/layouts/CardPageLayout.tsx`)
const AboutPageTemplate = require.resolve(`./src/layouts/AboutPageLayout.tsx`)
const ContactPageTemplate = require.resolve(
`./src/layouts/ContactPageLayout.tsx`
)
const ThankYouPageTemplate = require.resolve(
"./src/layouts/ThankYouPageLayout.tsx"
)
const ProjectDetailPageTemplate = require.resolve(
`./src/layouts/ProjectDetailPage.tsx`
)

exports.onPreBootstrap = ({ reporter }, themeOptions) => {
const { themeImageDirectory } = withDefaults(themeOptions)
Expand Down Expand Up @@ -104,7 +93,7 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
const { slug } = project
createPage({
path: `project/${slug}`,
component: ProjectDetailPageTemplate,
component: require.resolve(`./src/layouts/ProjectDetailPage.tsx`),
context: {
slug: slug,
},
Expand All @@ -119,7 +108,7 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
} = page
createPage({
path: `/${slug}`,
component: CardPageTemplate,
component: require.resolve(`./src/layouts/CardPageLayout.tsx`),
context: {
slug: slug,
statusFilter: status,
Expand All @@ -132,7 +121,7 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
const { slug } = page
createPage({
path: `/${slug}`,
component: AboutPageTemplate,
component: require.resolve(`./src/layouts/AboutPageLayout.tsx`),
context: {
slug: slug,
},
Expand All @@ -144,15 +133,15 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
const thankYouPagePath = `/${slug}/thank-you`
createPage({
path: `/${slug}`,
component: ContactPageTemplate,
component: require.resolve(`./src/layouts/ContactPageLayout.tsx`),
context: {
slug: slug,
thankYouPagePath: thankYouPagePath,
},
})
createPage({
path: thankYouPagePath,
component: ThankYouPageTemplate,
component: require.resolve("./src/layouts/ThankYouPageLayout.tsx"),
context: {
slug: slug,
},
Expand Down

0 comments on commit aa20304

Please sign in to comment.