Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions ui/mainPage/ContributorsProfile.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import Image from 'next/image';
import { use } from 'react';
import { useEffect, useState } from 'react';
import { getContributors } from '@/server/controllers/contributors';
import { ContributorsData } from '@/types/contributors.type';

const ContributorsProfile = () => {
const contributors: ContributorsData[] = use(getContributors());
const [contributors, setContributors] = useState<ContributorsData[]>([]);
useEffect(() => {
(async () => {
const data = await getContributors();
setContributors(data);
})();
}, []);

if (contributors.length === 0) {
return <></>;
Expand All @@ -20,7 +26,7 @@ const ContributorsProfile = () => {
quality={100}
alt="기여해주신 분들"
/>
<section className="flex gap-x-3 [&>img]:rounded-[60px] [&>img]:border [&>img]:border-secondary-900">
<section className="flex cursor-pointer gap-x-3 [&>img]:rounded-[60px] [&>img]:border [&>img]:border-secondary-900">
{contributors.map(({ login, avatar_url, profile }) => {
return (
<Image
Expand Down