Skip to content

Commit

Permalink
Merge pull request #91 from pluralsh/solution-pages
Browse files Browse the repository at this point in the history
Solution pages
  • Loading branch information
michaeljguarino authored Jun 29, 2024
2 parents 3ae3131 + 0ddbb24 commit a823fdb
Show file tree
Hide file tree
Showing 21 changed files with 1,309 additions and 427 deletions.
193 changes: 0 additions & 193 deletions pages/community.tsx

This file was deleted.

8 changes: 4 additions & 4 deletions pages/products/[product].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { FooterVariant } from '@src/components/FooterFull'
import { StandardPageWidth } from '@src/components/layout/LayoutHelpers'
import { BasicPageHero } from '@src/components/PageHeros'
import ProductFeature from '@src/components/ProductFeature'
import { productsConfigs } from '@src/data/getProductConfigs'
import { getProductsConfigs } from '@src/data/getProductConfigs'
import { propsWithGlobalSettings } from '@src/utils/getGlobalProps'

import { GradientBG } from '../../src/components/layout/GradientBG'
Expand All @@ -15,7 +15,7 @@ import { HeaderPad } from '../../src/components/layout/HeaderPad'
export default function Product({
slug,
}: InferGetStaticPropsType<typeof getStaticProps>) {
const productConfig = productsConfigs[slug]
const productConfig = getProductsConfigs()[slug]

return (
<HeaderPad
Expand Down Expand Up @@ -52,7 +52,7 @@ export default function Product({
}

export const getStaticPaths: GetStaticPaths = async () => {
const products = Object.keys(productsConfigs)
const products = Object.keys(getProductsConfigs())

if (process.env.NODE_ENV === 'development') {
return {
Expand All @@ -75,7 +75,7 @@ export const getStaticProps = async (context) => {
? context?.params?.product
: null

if (!slug || !productsConfigs[slug]) {
if (!slug || !getProductsConfigs()[slug]) {
return { notFound: true }
}

Expand Down
Loading

0 comments on commit a823fdb

Please sign in to comment.