Skip to content

Commit

Permalink
chore: hardcode
Browse files Browse the repository at this point in the history
  • Loading branch information
Pagebakers committed Nov 4, 2023
1 parent 71187ce commit 52cc52d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions apps/website/src/data/blocks/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,8 @@ export function getAllComponents(): ComponentInfo[] {
export function getComponent(
categoryName: string,
componentName: string,
rootFolder = process.env.TEMPLATE_ROOT || getRootFolder()
rootFolder = getRootFolder()
): ComponentInfo | null {
console.log('rootFolder', rootFolder)
const componentDirectory = path.join(rootFolder, categoryName, componentName)
const componentAttributes = path.join(componentDirectory, 'attributes.json')

Expand Down
3 changes: 2 additions & 1 deletion apps/website/src/pages/api/blocks/[category]/[component].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export default async function handler(
const attributes = getComponent(
categoryName,
componentName,
process.env.TEMPLATE_ROOT
process.env.TEMPLATE_ROOT ||
'/var/task/apps/website/.next/server/templates/src/'
)

if ((!attributes?.attributes.public && !data.session) || error) {
Expand Down

0 comments on commit 52cc52d

Please sign in to comment.