Skip to content

Commit

Permalink
Update [[...path]].tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
renzholy committed Jun 19, 2021
1 parent 1e3453b commit 903abfc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/[[...path]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ export const getStaticPaths: GetStaticPaths<Params> = async () => {
const ref = await octokit.rest.git.getRef({
owner: process.env.NEXT_PUBLIC_OWNER,
repo: process.env.NEXT_PUBLIC_REPO.replace(
`${process.env.NEXT_PUBLIC_OWNER}/`,
new RegExp(`^${process.env.NEXT_PUBLIC_OWNER}/`),
'',
),
ref: process.env.NEXT_PUBLIC_REF.replace(/^refs\//, ''),
})
const tree = await octokit.rest.git.getTree({
owner: process.env.NEXT_PUBLIC_OWNER,
repo: process.env.NEXT_PUBLIC_REPO.replace(
`${process.env.NEXT_PUBLIC_OWNER}/`,
new RegExp(`^${process.env.NEXT_PUBLIC_OWNER}/`),
'',
),
tree_sha: ref.data.object.sha,
Expand Down Expand Up @@ -135,7 +135,7 @@ export const getStaticProps: GetStaticProps<Props, Params> = async (
const content = await octokit.rest.repos.getContent({
owner: process.env.NEXT_PUBLIC_OWNER,
repo: process.env.NEXT_PUBLIC_REPO.replace(
`${process.env.NEXT_PUBLIC_OWNER}/`,
new RegExp(`^${process.env.NEXT_PUBLIC_OWNER}/`),
'',
),
ref: process.env.NEXT_PUBLIC_REF.replace(/^refs\//, ''),
Expand Down

0 comments on commit 903abfc

Please sign in to comment.