mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 08:41:37 +00:00
26 lines
566 B
TypeScript
26 lines
566 B
TypeScript
import '@catppuccin/highlightjs/sass/catppuccin-variables.rgb.scss';
|
|
import GistsCode from 'components/pages/gists/gists-code';
|
|
import { getSignalGist } from 'lib/fetcher';
|
|
|
|
const GistCode = async ({ id }: { id: string }) => {
|
|
const gist = await getSignalGist(id);
|
|
|
|
if (!gist?.files) {
|
|
return <div>Error</div>;
|
|
}
|
|
|
|
return (
|
|
<div>
|
|
{Object.keys(gist.files).map((f) => (
|
|
<GistsCode
|
|
key={gist.files[f].raw_url}
|
|
file={gist.files[f]}
|
|
showFileName
|
|
/>
|
|
))}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default GistCode;
|