Skip to content

Commit

Permalink
Merge pull request #248 from COW-dev/feat/#247
Browse files Browse the repository at this point in the history
  • Loading branch information
keemsebin authored Mar 9, 2025
2 parents f8ead54 + 1c5bb69 commit c3f04d8
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 48 deletions.
16 changes: 7 additions & 9 deletions src/components/club/ClubHeading.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Image from 'next/image';
import { useRouter } from 'next/router';
import dayjs from 'dayjs';
import Admin from '@/assets/admin.jpg';
Expand Down Expand Up @@ -46,15 +47,12 @@ export default function ClubHeading({ info }: ClubHeadingProps) {
<div className="flex flex-col">
<div className="flex flex-row items-end">
<div className="h-14 w-14 overflow-hidden rounded-full border-[1.5px] border-gray-100 md:h-20 md:w-20">
{
// eslint-disable-next-line @next/next/no-img-element
<img
src={profileImage?.originUrl ?? Admin.src}
alt="admin"
width={80}
height={80}
/>
}
<Image
src={profileImage?.originUrl ?? Admin.src}
alt="admin"
width={80}
height={80}
/>
</div>
<div className="ml-3">
<Heading>{name}</Heading>
Expand Down
9 changes: 4 additions & 5 deletions src/components/club/ClubInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@ export default function ClubInfo({
동아리 소개 이미지
</div>
{introductionImageUrl?.originUrl && (
// eslint-disable-next-line @next/next/no-img-element
<img
<Image
src={introductionImageUrl?.originUrl}
// width={1000}
// height={500}
// priority
width={1000}
height={500}
priority
alt="동아리 소개 사진"
className={`${
!introductionImageUrl && `hidden`
Expand Down
23 changes: 10 additions & 13 deletions src/components/feed/ClubFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,16 @@ export default function ClubFeed({
className="absolute left-2 top-2 md:h-8 md:w-8"
/>
)}
{
// eslint-disable-next-line @next/next/no-img-element
<img
width={350}
height={350}
src={item.thumbnailCdnUrl}
alt={`image-${index + 1}`}
// priority={index < 10}
style={{ objectFit: 'cover' }}
className="aspect-square"
onLoad={() => handleImageLoad(item.id)}
/>
}
<Image
width={350}
height={350}
src={item.thumbnailCdnUrl}
alt={`image-${index + 1}`}
priority={index < 10}
style={{ objectFit: 'cover' }}
className="aspect-square"
onLoad={() => handleImageLoad(item.id)}
/>
{item.feedType == 'VIDEO' && (
<Image
width={20}
Expand Down
10 changes: 4 additions & 6 deletions src/components/layout/UserHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,11 @@ export default function UserHeader() {
return (
<div className="flex w-full items-center justify-between px-6">
<Link href="/" className="inline-block">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
<Image
src={'/logo.png'}
width={1544}
height={380}
// priority
priority
alt="ddingdong"
className="w-32"
/>
Expand Down Expand Up @@ -147,12 +146,11 @@ export default function UserHeader() {
ref={dropdownRef}
>
<Link href="/">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
<Image
src={'/logo.png'}
width={1544}
height={380}
// priority
priority
alt="ddingdong"
className="w-40 md:w-44"
/>
Expand Down
11 changes: 3 additions & 8 deletions src/components/modal/feed/ClubFeedDetail.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @next/next/no-img-element */
import { useState } from 'react';
import Image from 'next/image';
import Link from 'next/link';
Expand All @@ -24,10 +23,6 @@ export default function ClubFeedDetail({ feedId }: Props) {
if (isSuccess) {
const feed = data.data;

// const imageSrc = feed?.clubProfile.profileImageCdnUrl
// ? feed.clubProfile?.profileImageCdnUrl
// : Admin;

const renderSkeleton = () => (
<div className="absolute inset-0">
<Skeleton />
Expand All @@ -46,7 +41,7 @@ export default function ClubFeedDetail({ feedId }: Props) {
) : (
<>
{!loadedImages && renderSkeleton()}
<img
<Image
src={feed?.fileUrls.cdnUrl}
alt={'동아리 피드'}
height={450}
Expand All @@ -63,12 +58,12 @@ export default function ClubFeedDetail({ feedId }: Props) {
href={location ? `/club/${feed?.clubProfile.id}` : '#'}
className="flex items-center text-base font-semibold md:text-2xl"
>
<img
<Image
src={data.data.clubProfile?.profileImageCdnUrl ?? Admin.src}
alt={'동아리 대표 이미지'}
width={80}
height={80}
// priority
priority
className="m-auto mr-3 h-12 w-12 rounded-full border-[1.5px] object-cover md:h-14 md:w-14"
/>
{feed?.clubProfile.name}
Expand Down
3 changes: 1 addition & 2 deletions src/hooks/api/apply/useApplicantInfo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable import/named */
import { useQuery } from '@tanstack/react-query';
import { AxiosError, AxiosResponse } from 'axios';
import { AxiosError, type AxiosResponse } from 'axios';
import { getApplicantInfo } from '@/apis';
import { ApplicantDetail } from '@/types/apply';

Expand Down
2 changes: 0 additions & 2 deletions src/pages/admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ export default function Index() {
</h2>
<Link
href={ROLE_TEXT[role].notice.route}
// eslint-disable-next-line prettier/prettier
className="-mr-1 inline-block p-1 text-sm font-semibold text-gray-400 transition-colors hover:text-blue-500 md:text-base"
>
더 보기
Expand Down Expand Up @@ -243,7 +242,6 @@ export default function Index() {
</h2>
<Link
href={ROLE_TEXT[role].documents.route}
// eslint-disable-next-line prettier/prettier
className="-mr-1 inline-block p-1 text-sm font-semibold text-gray-400 transition-colors hover:text-blue-500 md:text-base"
>
더 보기
Expand Down
4 changes: 1 addition & 3 deletions src/pages/admin/login/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-disable import/named */
import { useEffect, useState } from 'react';
import Head from 'next/head';
import { useRouter } from 'next/router';
import { AxiosResponse } from 'axios';
import { type AxiosResponse } from 'axios';
import { useCookies } from 'react-cookie';
import toast from 'react-hot-toast';
import { login } from '@/apis';
Expand All @@ -15,7 +14,6 @@ export default function Index() {
const router = useRouter();
const [id, setId] = useState<string>('');
const [pw, setPw] = useState<string>('');
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [cookie, setCookie, removeCookie] = useCookies([
'token',
'role',
Expand Down

0 comments on commit c3f04d8

Please sign in to comment.