+ {item.discount > 0 && (
+
{item.discount}%
+ )}
+
{item.imageUri && (
)}
- {item.discount &&
{item.discount}%
}
-
-
-
-
{item.itemName}
-
-
- {item.discount ? (
-
{item.originalPrice}
- ) : (
-
-
- {item.originalPrice}
-
- )}
- {item.discount !== 0 && (
-
-
- {item.salePrice}
-
- )}
-
-
-
-
-
-
-
+
{item.itemName}
+
+
+ 0 ? styles.onDiscount : styles.salePrice}
+ >
+ {item.originalPrice}
+
+ {item.discount > 0 && (
+ {item.salePrice}
+ )}
+
+
{item.mainContent}
+
{item.subContent}
+
+
+
);
diff --git a/pages/api/pingpong/items/store.ts b/pages/api/pingpong/items/store.ts
index 2735a4e18..3afce0b65 100644
--- a/pages/api/pingpong/items/store.ts
+++ b/pages/api/pingpong/items/store.ts
@@ -4,8 +4,9 @@ import type { NextApiRequest, NextApiResponse } from 'next';
const itemList: Item[] = [
{
itemId: 1,
- itemName: '프로필 사진 변경권',
- content: '42gg의 프로필 사진을 변경할 수 있는 아이템',
+ itemName: '이미지 변경권',
+ mainContent: '프사 바꿔',
+ subContent: '프로필 이미지를 원하는 이미지로 변경할 수 있는 아이템입니다.',
itemType: 'PROFILE_IMAGE',
imageUri: '/image/fallBackSrc.jpeg',
originalPrice: 100,
@@ -15,7 +16,9 @@ const itemList: Item[] = [
{
itemId: 2,
itemName: '확성기',
- content: '확성기 설명',
+ mainContent: '오늘 42GG는 내가 접수한다📢😎',
+ subContent:
+ '24시간 동안 모든 페이지 상단에 메시지를 띄울 수 있는 아이템입니다. 사용 다음날 적용됩니다.',
itemType: 'MEGAPHONE',
imageUri: '/image/fallBackSrc.jpeg',
originalPrice: 20,
@@ -24,8 +27,10 @@ const itemList: Item[] = [
},
{
itemId: 3,
- itemName: '프로필 배경색',
- content: '프로필 배경색 설명',
+ itemName: '배경 뽑기',
+ mainContent: '난 “Background”부터가 달라',
+ subContent:
+ '랜덤으로 내 프로필 페이지의 배경을 변경할 수 있는 아이템입니다.',
itemType: 'PROFILE_BACKGROUND',
imageUri: '/image/fallBackSrc.jpeg',
originalPrice: 300,
@@ -34,8 +39,9 @@ const itemList: Item[] = [
},
{
itemId: 4,
- itemName: '프로필 이미지띠',
- content: '설명',
+ itemName: 'Edge 뽑기',
+ mainContent: '난 “Edge”로 말해..',
+ subContent: '랜덤으로 프로필 테두리 색상을 변경할 수 있는 아이템입니다.',
itemType: 'PROFILE_BAND',
imageUri: '/image/fallBackSrc.jpeg',
originalPrice: 50,
@@ -44,8 +50,10 @@ const itemList: Item[] = [
},
{
itemId: 5,
- itemName: '이름 색 변경',
- content: '설명',
+ itemName: 'ID 색깔 변경권',
+ mainContent: '남들과는 다르게! ID 색깔을 바꿔보세요!',
+ subContent:
+ '색상코드를 직접 입력하여 랭킹 페이지의 ID 색상을 바꿀 수 있는 아이템입니다.',
itemType: 'TEXT_COLOR',
imageUri: '/image/fallBackSrc.jpeg',
originalPrice: 200,
diff --git a/stories/admin/AdminEditItem.stories.tsx b/stories/admin/AdminEditItem.stories.tsx
index 6b019eabd..57965a3a3 100644
--- a/stories/admin/AdminEditItem.stories.tsx
+++ b/stories/admin/AdminEditItem.stories.tsx
@@ -8,7 +8,7 @@ const meta: Meta
= {
argTypes: {
itemId: Number,
itemName: String,
- content: String,
+ mainContent: String,
imageUri: String,
originalPrice: Number,
discount: Number,
@@ -22,7 +22,7 @@ export const Megaphone: Story = {
args: {
itemId: 1,
itemName: '확성기',
- content: '확성기입니다',
+ mainContent: '확성기입니다',
imageUri: 'https://picsum.photos/200/300?grayscale',
originalPrice: 42,
discount: 50,
@@ -33,7 +33,7 @@ export const ProfileChange: Story = {
args: {
itemId: 2,
itemName: '프로필 변경권',
- content: '프로필 변경권입니다',
+ mainContent: '프로필 변경권입니다',
imageUri: 'https://picsum.photos/200/300?grayscale',
originalPrice: 42,
discount: 50,
@@ -43,7 +43,7 @@ export const ProfileBackgroundChange: Story = {
args: {
itemId: 3,
itemName: '프로필 배경 변경권',
- content: '프로필 배경 변경권입니다',
+ mainContent: '프로필 배경 변경권입니다',
imageUri: 'https://picsum.photos/200/300?grayscale',
originalPrice: 100,
discount: 40,
diff --git a/styles/modal/store/UserCoinHistoryModal.module.scss b/styles/modal/store/UserCoinHistoryModal.module.scss
index 86750c095..cc29c07b5 100644
--- a/styles/modal/store/UserCoinHistoryModal.module.scss
+++ b/styles/modal/store/UserCoinHistoryModal.module.scss
@@ -20,8 +20,5 @@
font-size: 1.3rem;
color: #ffffff;
justify-content: space-between;
- .currentCoin {
- @include ggCoin;
- }
}
}
diff --git a/styles/store/CoinImage.module.scss b/styles/store/CoinImage.module.scss
new file mode 100644
index 000000000..c84539567
--- /dev/null
+++ b/styles/store/CoinImage.module.scss
@@ -0,0 +1,9 @@
+@import 'styles/common.scss';
+
+.ggCoin {
+ color: $coin-yellow;
+ img {
+ margin-right: 0.2rem;
+ transform: translateY(0.2rem);
+ }
+}
diff --git a/styles/store/ItemCard.module.scss b/styles/store/ItemCard.module.scss
index ba2ef344e..a8dfa595b 100644
--- a/styles/store/ItemCard.module.scss
+++ b/styles/store/ItemCard.module.scss
@@ -1,114 +1,110 @@
@import 'styles/common.scss';
.itemCard {
- position: relative;
- display: flex;
- width: 90%;
- flex-direction: column;
- margin: 1rem auto;
- overflow: hidden;
+ display: grid;
+ width: 100%;
+ height: 12.5rem;
+ padding: 0.2rem 0 0.2rem 0.2rem;
+ margin-bottom: 0.7rem;
font-family: 'NanumSquare_acR', sans-serif;
- background: white;
- border-radius: 1rem;
+ background: #ffffff5f;
+ border-radius: 0.3rem;
+ grid-template-columns: 1fr 3fr;
+ grid-template-rows: repeat(6, auto);
+ grid-template-areas:
+ 'image header header ribbon'
+ 'image price price price'
+ 'image mainContent mainContent mainContent'
+ 'image subContent subContent subContent'
+ 'image subContent subContent subContent'
+ 'image footer footer footer';
+ column-gap: 0.5rem;
.preview {
+ grid-area: image;
position: relative;
- height: inherit;
-
+ width: 9.5rem;
+ height: 9.5rem;
+ margin: 1.25rem 0;
.img {
- max-width: 100%;
- height: 8rem;
- max-height: 100%;
- }
- .badge {
- position: absolute;
- top: 7%;
- right: 0;
- width: 3rem;
- color: #fff;
- text-align: center;
- background-color: #c03434;
- border-radius: 1.25rem 0 0 1.25rem;
+ object-fit: cover;
}
}
- .details {
- position: relative;
- z-index: 1;
- width: 100%;
- height: 100%;
- padding-top: 0.5rem;
- padding-right: 1rem;
- padding-left: 1rem;
- background-color: $g1-bottom;
-
- .itemPriceTag {
- display: flex;
- flex-direction: row;
- align-items: baseline;
- justify-content: space-between;
- color: $coin-yellow;
- .title {
- font-weight: bold;
- color: black;
- text-align: center;
- }
- .priceTags {
- @include ggCoin;
- .originalPrice {
- padding: 0;
- margin: 0;
- font-size: 1rem;
- }
-
- .onDiscount {
- padding: 0;
- margin: 0;
- font-size: 0.8rem;
- text-decoration: line-through 0.1rem solid #ff4040;
- }
-
- .discountedPrice {
- padding: 0;
- margin: 0;
- font-size: 1rem;
- font-weight: bold;
- text-align: center;
- transform: translateY(-0.05rem);
- }
- }
+ .title {
+ margin-top: 1rem;
+ font-size: 1.1rem;
+ font-weight: bold;
+ color: black;
+ grid-area: header;
+ }
+ .priceTag {
+ grid-area: price;
+ font-size: 0.9rem;
+ color: $coin-yellow;
+ @include ggCoin;
+ .salePrice {
+ font-weight: bold;
}
- .content {
- color: #282828;
+ .onDiscount {
+ margin-right: 0.2rem;
+ text-decoration: line-through 0.1rem solid #c03434;
}
- .buttons {
- display: flex;
- flex-direction: row;
- justify-content: space-evenly;
- align-items: center;
- margin-top: 1rem;
- margin-bottom: 0.5rem;
-
- .gift {
- width: 40%;
- height: 1.5rem;
- color: white;
- background: linear-gradient(
- 180deg,
- #ea80ea 0%,
- rgba(211, 36, 182, 0.72) 100%
- );
- border-style: none;
- border-radius: 0.625rem;
- }
- .buy {
- width: 40%;
- height: 1.5rem;
- color: white;
- background: $btn-purple;
- border-style: none;
- border-radius: 0.625rem;
- }
+ }
+ .mainContent {
+ padding-right: 0.3rem;
+ font-size: 0.9rem;
+ font-style: italic;
+ color: #282828;
+ grid-area: mainContent;
+ }
+ .subContent {
+ padding-right: 0.5rem;
+ overflow: scroll;
+ font-size: 0.8rem;
+ color: #343434;
+ grid-area: subContent;
+ }
+ .buttons {
+ grid-area: footer;
+ display: flex;
+ justify-content: space-evenly;
+ .gift {
+ width: auto;
+ min-width: 4rem;
+ height: 1.5rem;
+ font-family: 'NanumSquare_acR', sans-serif;
+ color: white;
+ background: linear-gradient(
+ 180deg,
+ #ea80ea 0%,
+ rgba(211, 36, 182, 0.72) 100%
+ );
+ border-style: none;
+ border-radius: 0.3rem;
+ }
+ .buy {
+ width: auto;
+ min-width: 4rem;
+ height: 1.5rem;
+ font-family: 'NanumSquare_acR', sans-serif;
+ color: white;
+ background: $btn-purple;
+ border-style: none;
+ border-radius: 0.3rem;
}
}
}
+
+.badge {
+ width: 2.5rem;
+ height: 1rem;
+ padding-top: 0.1rem;
+ margin-top: 0.5rem;
+ font-size: 0.8rem;
+ color: #fff;
+ text-align: center;
+ background-color: #c03434;
+ border-radius: 1.25rem 0 0 1.25rem;
+ grid-area: ribbon;
+}
diff --git a/types/itemTypes.ts b/types/itemTypes.ts
index 7c5c45967..7e2684047 100644
--- a/types/itemTypes.ts
+++ b/types/itemTypes.ts
@@ -1,7 +1,8 @@
export interface Item {
itemId: number;
itemName: string;
- content: string;
+ mainContent: string;
+ subContent: string;
itemType: string;
imageUri: string;
originalPrice: number;