mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-16 01:01:38 +00:00
Format code
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
import clsx from 'clsx';
|
||||
import { Project } from 'pages/projects';
|
||||
import { Children, cloneElement, isValidElement } from 'react';
|
||||
import { Children, cloneElement, isValidElement, ReactElement } from 'react';
|
||||
import { VscGithubInverted } from 'react-icons/vsc';
|
||||
|
||||
type ProjectCardProps = {
|
||||
project: Project;
|
||||
icon?: React.ReactElement<{ className?: string }>;
|
||||
icon?: ReactElement<{ className?: string }>;
|
||||
};
|
||||
|
||||
const ProjectCard = ({ project, icon }: ProjectCardProps) => {
|
||||
|
@ -86,19 +86,20 @@ export const getStaticProps: GetStaticProps<{
|
||||
next: number;
|
||||
total: number;
|
||||
}> = async ({ params }) => {
|
||||
if (typeof params?.p !== 'string')
|
||||
if (typeof params?.p !== 'string') {
|
||||
return {
|
||||
notFound: true,
|
||||
};
|
||||
}
|
||||
|
||||
const result = await getGists(Number(params?.p));
|
||||
if (!result)
|
||||
if (!result) {
|
||||
return {
|
||||
notFound: true,
|
||||
};
|
||||
}
|
||||
|
||||
const user = await getUser();
|
||||
|
||||
return {
|
||||
props: {
|
||||
gists: result,
|
||||
|
Reference in New Issue
Block a user