[build][sm] - fix build
This commit is contained in:
parent
868e9816a0
commit
39ceabc370
@ -1,44 +0,0 @@
|
||||
import DRD from "../../../components/drd/DRD";
|
||||
import MDLayout from "../../../components/MDLayout";
|
||||
import parse from "../../../lib/markdown";
|
||||
import Project from "../../../lib/project";
|
||||
import { NextSeo } from "next-seo";
|
||||
|
||||
export default function ProjectFile({ mdxSource, frontMatter, project }) {
|
||||
return (
|
||||
<>
|
||||
<NextSeo title={`DataHub - @${project.owner}/${project.name}`} />
|
||||
<MDLayout layout={frontMatter.layout} {...frontMatter}>
|
||||
<DRD source={mdxSource} />
|
||||
</MDLayout>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export async function getServerSideProps({ params }) {
|
||||
const { org: orgName, project: projectName, slug } = params;
|
||||
|
||||
const project = await Project.getFromGitHub(orgName, projectName);
|
||||
|
||||
let content = null;
|
||||
|
||||
try {
|
||||
content = await project.getFileContent(slug.join("/") + ".md");
|
||||
} catch (e) {
|
||||
return {
|
||||
notFound: true,
|
||||
};
|
||||
}
|
||||
|
||||
const { mdxSource, frontMatter } = await parse(content, ".mdx");
|
||||
|
||||
return {
|
||||
props: {
|
||||
mdxSource,
|
||||
frontMatter,
|
||||
project: project.serialize(),
|
||||
slug: slug || [],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import axios from "axios";
|
||||
|
||||
export default function handler(req, res) {
|
||||
console.log(req.query.url)
|
||||
if (!req.query.url) {
|
||||
res.status(200).send({
|
||||
error: true,
|
||||
|
||||
@ -50,7 +50,6 @@ const formatter = new Intl.DateTimeFormat('en-US', {
|
||||
});
|
||||
|
||||
export function Datasets({ projects }) {
|
||||
console.log(projects);
|
||||
return (
|
||||
<div className="bg-white">
|
||||
<div className="mx-auto max-w-7xl px-6 py-16 sm:py-24 lg:px-8">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user