[simple-example][sm] - change from repos.json to datasets.json
This commit is contained in:
@@ -70,7 +70,7 @@ export default function ProjectPage({
|
|||||||
|
|
||||||
// Generates `/posts/1` and `/posts/2`
|
// Generates `/posts/1` and `/posts/2`
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const jsonDirectory = path.join(process.cwd(), '/examples/simple-example/repos.json');
|
const jsonDirectory = path.join(process.cwd(), '/examples/simple-example/datasets.json');
|
||||||
const repos = await fs.readFile(jsonDirectory, 'utf8');
|
const repos = await fs.readFile(jsonDirectory, 'utf8');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import Link from 'next/link';
|
|||||||
export async function getStaticProps() {
|
export async function getStaticProps() {
|
||||||
const jsonDirectory = path.join(
|
const jsonDirectory = path.join(
|
||||||
process.cwd(),
|
process.cwd(),
|
||||||
'/examples/simple-example/repos.json'
|
'/examples/simple-example/datasets.json'
|
||||||
);
|
);
|
||||||
const repos = await fs.readFile(jsonDirectory, 'utf8');
|
const repos = await fs.readFile(jsonDirectory, 'utf8');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user