mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
✨ Change fetch to oct
This commit is contained in:
@ -1,16 +1,16 @@
|
||||
import Anchor from 'components/mdx/Anchor';
|
||||
import Loading from 'components/RUA/loading/RUALoading';
|
||||
import dayjs from 'dayjs';
|
||||
import { GistData } from 'lib/fetcher';
|
||||
import dynamic from 'next/dynamic';
|
||||
import Link from 'next/link';
|
||||
import { Gist } from 'types';
|
||||
|
||||
const GistsCode = dynamic(() => import('components/gists/GistsCode'), {
|
||||
loading: () => <Loading classNames="h-[300px]" />,
|
||||
});
|
||||
|
||||
type Props = {
|
||||
gists: Gist[];
|
||||
gists: GistData[];
|
||||
};
|
||||
|
||||
const FileContent = ({ gists }: Props) => {
|
||||
@ -23,7 +23,7 @@ const FileContent = ({ gists }: Props) => {
|
||||
<div key={g.files[f].raw_url} className="pb-4 ">
|
||||
{/* Username and file name */}
|
||||
<h1 className="md:text-lg">
|
||||
{g.owner.login} /
|
||||
{g.login} /
|
||||
<Link href={`/g/${g.id}`} passHref>
|
||||
<Anchor external={false}>{g.files[f].filename}</Anchor>
|
||||
</Link>
|
||||
|
@ -1,11 +1,11 @@
|
||||
import classNames from 'classnames';
|
||||
import { GetUser } from 'lib/fetcher';
|
||||
import Image from 'next/image';
|
||||
import avatar from 'public/images/img/avatar.svg';
|
||||
import { FiLink, FiMail, FiTwitter } from 'react-icons/fi';
|
||||
import { GithubUser } from 'types';
|
||||
|
||||
type Props = {
|
||||
user: GithubUser;
|
||||
user: GetUser;
|
||||
};
|
||||
|
||||
const UserInfo = ({ user }: Props) => {
|
||||
@ -53,22 +53,26 @@ const UserInfo = ({ user }: Props) => {
|
||||
<a href={`mailto:${user.email}`}>{user.email}</a>
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex items-center mb-1">
|
||||
<FiLink className="mr-2" />
|
||||
<a href={user.blog} target="_blank" rel="noreferrer">
|
||||
{user.blog}
|
||||
</a>
|
||||
</div>
|
||||
<div className="flex items-center mb-1">
|
||||
<FiTwitter className="mr-2" />
|
||||
<a
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
href={`https://twitter.com/${user.twitter_username}`}
|
||||
>
|
||||
@{user.twitter_username}
|
||||
</a>
|
||||
</div>
|
||||
{user.blog && (
|
||||
<div className="flex items-center mb-1">
|
||||
<FiLink className="mr-2" />
|
||||
<a href={user.blog} target="_blank" rel="noreferrer">
|
||||
{user.blog}
|
||||
</a>
|
||||
</div>
|
||||
)}
|
||||
{user.twitter_username && (
|
||||
<div className="flex items-center mb-1">
|
||||
<FiTwitter className="mr-2" />
|
||||
<a
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
href={`https://twitter.com/${user.twitter_username}`}
|
||||
>
|
||||
@{user.twitter_username}
|
||||
</a>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
Reference in New Issue
Block a user