Skip to content

Commit

Permalink
Merge pull request #145 from SuSang-YuHee/dev
Browse files Browse the repository at this point in the history
v2.1.5
  • Loading branch information
YuchanJeong authored Sep 7, 2022
2 parents c6367fa + f1d4fed commit 929f2fe
Show file tree
Hide file tree
Showing 45 changed files with 25 additions and 24 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

## Release

### Debate Ducks 2.1.5 [[PR]](https://github.com/SuSang-YuHee/Debate-Ducks-Client/pull/145)
(2022.09.07)
- 이미지 최적화

### Debate Ducks 2.1.4 [[PR]](https://github.com/SuSang-YuHee/Debate-Ducks-Client/pull/143)
(2022.08.31)
- 토론 영상 업로드 실패 문제 해결
Expand Down
3 changes: 1 addition & 2 deletions components/common/Error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ export default function Error() {
{"Go to homepage"}
</div>
<Image
src={"/images/duckling.png"}
src={"/images/duckling.webp"}
alt={"duckling"}
width={400}
height={400}
unoptimized={true}
priority={true}
/>
</div>
Expand Down
5 changes: 3 additions & 2 deletions components/common/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ export default function Footer() {
>
<div>
<Image
src="/images/logo/debate-ducks-logo-white.png"
src="/images/logo/debate-ducks-logo-white.webp"
alt="logo_image"
width="18"
height="18"
height="16"
priority={true}
/>
</div>
<div className={styles.desc}>Debate Ducks</div>
Expand Down
3 changes: 1 addition & 2 deletions components/common/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,11 @@ export default function Header() {
src={
user.data?.profile_image !== "temp default image"
? `${process.env.NEXT_PUBLIC_API_URL}/uploads/${user.data?.profile_image}`
: "/images/profiles/default-green.png"
: "/images/profiles/default-green.webp"
}
alt="profile_image"
width="30"
height="30"
unoptimized={true}
onClick={handleProfileClick}
/>
</div>
Expand Down
10 changes: 4 additions & 6 deletions components/debates/DebaterInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@ export default function DebaterInfo({
debate.data?.author?.profile_image
? debate.data?.author?.profile_image !== "temp default image"
? `${process.env.NEXT_PUBLIC_API_URL}/uploads/${debate.data?.author.profile_image}`
: "/images/profiles/default-green.png"
: "/images/profiles/default-gray.png"
: "/images/profiles/default-green.webp"
: "/images/profiles/default-gray.webp"
}
alt={debate.data?.author?.nickname || "탈퇴한 회원"}
width={`${size}`}
height={`${size}`}
objectFit="cover"
objectPosition="center"
unoptimized={true}
priority={true}
/>
</div>
Expand Down Expand Up @@ -67,15 +66,14 @@ export default function DebaterInfo({
debate.data?.participant?.profile_image
? debate.data?.participant?.profile_image !== "temp default image"
? `${process.env.NEXT_PUBLIC_API_URL}/uploads/${debate.data?.participant.profile_image}`
: "/images/profiles/default-green.png"
: "/images/profiles/default-gray.png"
: "/images/profiles/default-green.webp"
: "/images/profiles/default-gray.webp"
}
alt={debate.data?.participant?.nickname || "탈퇴한 회원"}
width={`${size}`}
height={`${size}`}
objectFit="cover"
objectPosition="center"
unoptimized={true}
priority={true}
/>
</div>
Expand Down
5 changes: 2 additions & 3 deletions components/debates/debate/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ export default function Comments({ debateId }: { debateId: number }) {
? comment.target_user.profile_image !==
"temp default image"
? `${process.env.NEXT_PUBLIC_API_URL}/uploads/${comment.target_user.profile_image}`
: "/images/profiles/default-green.png"
: "/images/profiles/default-gray.png"
: "/images/profiles/default-green.webp"
: "/images/profiles/default-gray.webp"
}
alt={
comment.target_user?.nickname || "탈퇴한 회원"
Expand All @@ -209,7 +209,6 @@ export default function Comments({ debateId }: { debateId: number }) {
height="50"
objectFit="cover"
objectPosition="center"
unoptimized={true}
/>
</div>
<div className={styles.name}>
Expand Down
4 changes: 2 additions & 2 deletions components/debates/debate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ export default function Debate({ debateId }: { debateId: number }) {
<Image
src={`/images/categories/${CATEGORIES.indexOf(
debate.data?.category || "기타",
)}.jpg`}
alt={`${debate.data?.category || "기타"}`}
)}.webp`}
layout="fill"
alt={`${debate.data?.category || "기타"}`}
objectFit="cover"
objectPosition="center"
priority={true}
Expand Down
6 changes: 4 additions & 2 deletions components/debates/debates/DebateCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ export default function DebateCard({
className={styles.image}
src={`/images/categories/${CATEGORIES.indexOf(
debate.data?.category || "기타",
)}.jpg`}
)}.webp`}
alt={`${debate.data?.category}`}
layout="fill"
sizes="20"
width="20"
height="9.6"
objectFit="cover"
objectPosition="center"
priority={true}
Expand Down
5 changes: 2 additions & 3 deletions pages/mypage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,15 @@ export default function MyPagePage() {
alt="profile_image"
src={
!user.data
? "/images/profiles/default-gray.png"
? "/images/profiles/default-gray.webp"
: previewImageUrl
? previewImageUrl
: user.data?.profile_image !== "temp default image"
? `${process.env.NEXT_PUBLIC_API_URL}/uploads/${user.data?.profile_image}`
: "/images/profiles/default-green.png"
: "/images/profiles/default-green.webp"
}
width="300"
height="300"
unoptimized={true}
/>
{user.data ? (
<form
Expand Down
2 changes: 1 addition & 1 deletion pages/q&a/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import "../../styles/variable.scss";

.experience_box {
background-image: url("/images/qna.jpg");
background-image: url("/images/qna.webp");
background-repeat: no-repeat;
background-size: cover;
min-width: 22rem;
Expand Down
Binary file removed public/images/arrow.png
Binary file not shown.
Binary file added public/images/arrow.webp
Binary file not shown.
Binary file removed public/images/categories/0.jpg
Binary file not shown.
Binary file added public/images/categories/0.webp
Binary file not shown.
Binary file removed public/images/categories/1.jpg
Binary file not shown.
Binary file added public/images/categories/1.webp
Binary file not shown.
Binary file removed public/images/categories/2.jpg
Binary file not shown.
Binary file added public/images/categories/2.webp
Binary file not shown.
Binary file removed public/images/categories/3.jpg
Binary file not shown.
Binary file added public/images/categories/3.webp
Binary file not shown.
Binary file removed public/images/categories/4.jpg
Binary file not shown.
Binary file added public/images/categories/4.webp
Binary file not shown.
Binary file removed public/images/categories/5.jpg
Binary file not shown.
Binary file added public/images/categories/5.webp
Binary file not shown.
Binary file removed public/images/categories/6.jpg
Binary file not shown.
Binary file added public/images/categories/6.webp
Binary file not shown.
Binary file removed public/images/categories/7.jpg
Binary file not shown.
Binary file added public/images/categories/7.webp
Binary file not shown.
Binary file removed public/images/categories/8.jpg
Binary file not shown.
Binary file added public/images/categories/8.webp
Binary file not shown.
Binary file removed public/images/categories/9.jpg
Binary file not shown.
Binary file added public/images/categories/9.webp
Binary file not shown.
Binary file removed public/images/duckling.png
Binary file not shown.
Binary file added public/images/duckling.webp
Binary file not shown.
Binary file removed public/images/logo/debate-ducks-logo-white.png
Binary file not shown.
Binary file added public/images/logo/debate-ducks-logo-white.webp
Binary file not shown.
Binary file removed public/images/logo/debate-ducks-logo.png
Binary file not shown.
Binary file added public/images/logo/debate-ducks-logo.webp
Binary file not shown.
Binary file removed public/images/profiles/default-gray.png
Binary file not shown.
Binary file added public/images/profiles/default-gray.webp
Binary file not shown.
Binary file removed public/images/profiles/default-green.png
Binary file not shown.
Binary file added public/images/profiles/default-green.webp
Binary file not shown.
Binary file removed public/images/qna.jpg
Binary file not shown.
Binary file added public/images/qna.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion styles/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ select {
-moz-appearance: none;
appearance: none;
//> 화살표 표시
background: url("/images/arrow.png") no-repeat 95% 50%/0.7rem auto;
background: url("/images/arrow.webp") no-repeat 95% 50%/0.7rem auto;
}

0 comments on commit 929f2fe

Please sign in to comment.