-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GGFE-44] Style Rank Trophy #807
[GGFE-44] Style Rank Trophy #807
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ณ ์ํ์ จ์ต๋๋ค!! ๐ ์๋ฌ ์ฃผ์๊ณผ ์ฝ์๋ง ์ฒ๋ฆฌํ์๋ฉด ๋ ๊ฒ ๊ฐ์์!!
hooks/rank/useRankList.ts
Outdated
url: makePathRanker, | ||
setState: (data) => { | ||
const temp = data?.rankList[1]; | ||
data?.rankList.splice(1, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[data.rankList[0], data.rankList[1]] = [data.rankList[1], data.rankList[0]] ์ผ๋ก๋ ์ํ์๋ ๊ฐ์ ์ป์ ์ ์๋ ๊ฒ ๊ฐ์์!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ข์ ๋ฐฉ๋ฒ์ด๋ค์! ๊ฐ์ฌํฉ๋๋ค
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ณ ์ํ์ จ์ต๋๋ค!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด๊ฑฐ๋ ์๋ชป์์ฑ๋ ํ์ผ์ธ๊ฑฐ๊ฐ์๋ฐ ๋ง์๊น์?
<PlayerImage | ||
src={userImageUri} //์ฌ์ง ํฌ๊ธฐ ํค์ฐ๊ธฐ, | ||
styleName={rank === 1 ? 'ranktropy' : 'gameResultBig'} | ||
size={50} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฃผ์์ ์ฒ๋ฆฌ๊ฐ ๋๋์ด์ ๋จ์์๋ ๊ฑด๊ฐ์?
์คํ์ผ์ ์ฐพ์๋ณด๋๊น gameResultBig์ด๋ผ๋ ์คํ์ผ์ด ์กด์ฌํ์ง ์๋๋ฐ ์ผํญ์ฐ์ฐ์ ์ฐ์ ์ด์ ๊ฐ ๊ถ๊ธํด์!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gameResultBig์ PlayerImage์์ ๊ธฐ์กด์ game๊ฒฐ๊ณผ ๋ณด์ฌ์ค ๋ ํฌ๊ฒ ๋ณด์ด๋ ํญ๋ชฉ์ ์ฌ์ง์ ์ฌ์ฉํ๋ ์คํ์ผ์ผ๋ก ์๊ณ ์์ด์! (์๋ ์๋ ๊ฒ์ด๋ผ ๋ณ๊ฒฝ์ฌํญ์๋ ๋ฐ์๋์ง ์์๋ค์)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gameResultBig์ ์๋ ์ฌ์ฉ๋๋ ๋ถ๋ถ์ด๊ณ ranktropy๋ rank๊ฐ 1๋ฑ์ธ ๊ฒฝ์ฐ์๋ง ํฌ๊ธฐ๋ณํ๊ฐ ํ์ํด์ ๋ฐ๋ก ์ค ๋ถ๋ถ์ ๋๋ค.
const content = { | ||
normal: { style: styles.normal, title: 'VIP' }, | ||
rank: { style: '', title: 'Champion' }, | ||
both: { style: '', title: 'Champion' }, | ||
}; | ||
|
||
//console.log(rank); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฝ์๋ก๊ทธ๋ ์ง์์ฃผ์ธ์~
hooks/mode/useModeToggle.ts
Outdated
const useModeToggle = (toggleMode: 'normal' | 'rank') => { | ||
const [Mode, setMode] = useState(toggleMode); | ||
|
||
const onToggle = (): void => { | ||
setMode(Mode === 'RANK' ? 'NORMAL' : 'RANK'); | ||
setMode(Mode === 'rank' ? 'normal' : 'rank'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด ๋ถ๋ถ์ ๋ค์ ์๋ฌธ์๋ก ๋ฐ๋๋๊ฒ ๋ง๋๊ฑด๊ฐ์?
hooks/useAxiosGet.ts
Outdated
@@ -54,7 +54,7 @@ const useAxiosGet = ({ | |||
} else if (type === 'console') { | |||
console.log(err); | |||
} else if (type === 'setError') { | |||
setError(err); | |||
//setError(err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฃผ์ ํ์ด์ฃผ์ธ์!
styles/rank/RankListMain.module.scss
Outdated
.leaf { | ||
height: 8.4rem; | ||
background: linear-gradient( | ||
70.48deg, | ||
#693200 28.73%, | ||
#ed9b00 38.5%, | ||
#fede5d 41.72%, | ||
#fffdd2 60.48%, | ||
#b5661d 73.6%, | ||
#5c2f06 76.05% | ||
); | ||
border-radius: 65px 65px 100px 0px; | ||
} | ||
|
||
.leaf1 { | ||
height: 8rem; | ||
background: linear-gradient(180deg, #ffcf55 36.24%, #ff823c 73.96%); | ||
border-radius: 65px 65px 100px 0px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด์๊ฒ ์๋์ค๋ค์ ์งฑ์ด์์ฌ๐๐
styles/rank/RankListMain.module.scss
Outdated
font-size: 1.05rem; | ||
display: grid; | ||
grid-template-columns: 1fr 1fr 1fr; /* grid-template-rows๋ก ๋ณ๊ฒฝ */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฃผ์์ผ๋ก ๋จ๊ธฐ์ ๋ถ๋ถ๋ค์ ํ์ธํด์ฃผ์๊ณ ์ด๋ฏธ ์์ ๋ ์ฌํญ์ด๋ฉด ์ง์์ฃผ์๋ฉด ๊ฐ์ฌํ๊ฒ ์ต๋๋ค~
styles/rank/RankListMain.module.scss
Outdated
color: white; | ||
font-size: 1.8rem; | ||
font-family: $title-font; | ||
text-shadow: $text-border-black; | ||
z-index: 1; | ||
//text-shadow: $text-border-black; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฃผ์22
utils/infinityScroll.ts
Outdated
@@ -18,7 +18,7 @@ export default function InfScroll(path: string) { | |||
}, | |||
onError: (e: any) => { | |||
if (e.response.data.code === 'UF001') setError('JB07'); | |||
else setError('KP01'); | |||
//else setError('KP01'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฌ๊ธฐ๋ ์ฃผ์ ํด์ ํด์ฃผ์ธ์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ญํฌ ํธ๋กํผ ์ด๋ฏธ์ง ์์๊ฒ ์ ์ ์ฉ๋ฉ๋๋ค ๐ ์ฝ๋ฉํธ์ ๋จ๊ฒจ๋จ๋๋ฐ ๋ญํฌ ํธ๋กํผ์์ intraId ํฐํธ ์์ ๋ค๋ฅธ ๊ฑฐ๋ ๋ฑ ์ด๋ฏธ์ง ๋ชจ๋ฐ์ผ์์ ์์ง์ด๋ ๊ฑฐ๋ง ์์ ํ์๋ฉด ๋ ๋ฏํฉ๋๋ค!! ๊ณ ์ํ์ จ์ต๋๋ค!! ๐
components/rank/RankList.tsx
Outdated
const seasonMode = 'RANK'; | ||
export const ToggleModeContext = createContext<'RANK' | 'NORMAL'>('RANK'); | ||
|
||
export default function RankList(prop: RankListProps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด ๋ถ๋ถ์ {toggleMode, season, isMain}: RankListProps๋ก ์ธ์ ์์์ ๊ตฌ์กฐ๋ถํดํด๋ ๋ ๊ฒ ๊ฐ์์!
<RankListItem | ||
key={index} | ||
toggleMode={toggleMode} | ||
user={makeUser(item)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makeUser์ ๋ฐํ๊ฐ๋ ํ์ ์ง์ ํด์ฃผ๋ฉด RankListItem์์ ํ์ ๊ฒฝ๊ณ ์์ด์ง ๋ฏ ํฉ๋๋ค!
styleName={rank === 1 ? 'ranktropybig' : 'ranktropy'} | ||
size={50} | ||
/> | ||
<span>{intraId}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํผ๊ทธ๋ง ๋ณด์๋ฉด intraId๋ ์์์ ๋ฐ๋ผ ํฐํธ์๊น์ด ๋ฌ๋ผ์ง๋ ๊ฒ ๊ฐ์์!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ๊ฒ์์์ธ์ค ์์๋๋ฐ ๋ฑ์์ ๋ฐ๋ผ ์์์ด ๋ค ๋ค๋ฅด๋ค์ ๊ฐ์ฌํฉ๋๋ค!
both: { style: '', title: 'Champion' }, | ||
}; | ||
export default function RankListMain({ rank, isMain }: RankListMainProps) { | ||
const bangElements = Array.from({ length: 5 }, (_, index) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Array๋ฅผ ์ด๋ ๊ฒ๋ ๋ง๋ค ์ ์๊ตฐ์. ๋ฐฐ์๊ฐ๋๋ค!! ๐
styles/PlayerImage.module.scss
Outdated
} | ||
} | ||
|
||
@media (max-width: 767px) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ฏธ๋์ด์ฟผ๋ฆฌ๋ก ํ๋ฉด ํฌ๊ธฐ์ ๋ฐ๋ผ ํฌ๊ธฐ ๋ค๋ฅด๊ฒ ์ ์ฉํ๋ ๊ฑฐ ์ข๋ค์! ๐
transform: scale(1.14); | ||
} | ||
|
||
.mainData:nth-child(1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nth-child ํ์ฉํ๋ ๊ฑฐ ๋ฐฐ์ฐ๊ณ ๊ฐ๋๋ค!! ๐
@@ -59,3 +59,31 @@ | |||
@include userImage(4.7rem); | |||
} | |||
} | |||
|
|||
.ranktropybig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ๋ ์ด์ด ์ด๋ฏธ์ง๊ฐ ํผ๊ทธ๋ง์์๋ ํ ๋๋ฆฌ๊ฐ ์๋๋ฐ ๋ฐ๋ก ์ถ๊ฐํ์ ๊ฑธ๊น์?
margin-top: -7.5rem; | ||
} | ||
|
||
.bang { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ชจ๋ฐ์ผ ํ๋ฉด์์๋ bang์ด ํ์ชฝ์ผ๋ก ์ ๋ ค์ ๋์ค๋ค์ ๐ฑ ์์ ๋ถํ๋๋ ค์!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๋ ค์ฃผ์ ๋ฐฉ๋ฒ์ผ๋ก ์์ ํด๋์์ต๋๋ค!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CSS ๋ง์คํฐ,,,๐ณ ํธ๋กํผ ๋ถ๋ถ ์์๊ฒ ์ ๋์ค๊ณ ์๋ฌ๋ค๋ ์ฌ๋ผ์ก๋ค์!! ๐ ์๊ณ ํ์ จ์ต๋๋ค!!
{rank?.rankList.map((item: NormalUser | RankUser, index) => ( | ||
<RankListItem | ||
key={index} | ||
toggleMode={toggleMode} | ||
user={makeUser(item)} | ||
/> | ||
))} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ง์ฝ์ rank ๋ฐฐ์ด์ ์์๊ฐ 3๊ฐ ๋ฏธ๋ง์ด๋ฉด ์ด๋ป๊ฒ ๋๋์? ์ ๋ฒ์ ์์ฆ ์๋ก ๋ง๋ค์์ ๋ ์์๊ฐ 2๋ฑ๊น์ง์ธ๊ฐ ๋ฐ์ ์์๋ ๊ฒ์ ๋ณธ ์ ์ด ์์๋๋ฐ ๊ทธ๋๋ ๊ทธ๋ฅ ๋น์ด์์๋ ๊ฒ ๊ฐ์์์. ์ง๊ธ์ ์ด๋ป๊ฒ ์ฒ๋ฆฌ๋์ด์๋ ๋ณด๊ณ ์ถ๊ธด ํ๋ฐ ๋ณผ ๋ฐฉ๋ฒ์ด ์๋ค์... (์ด๋ ๊ฒ ์ง์ ํ์ธํด๋ณด๊ธฐ ์ด๋ ค์ด ๊ฒฝ์ฐ์๋ story ๋ง๋ค์ด์ฃผ์๋ฉด ์ข์ ๊ฒ ๊ฐ์์ ๐)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ฐฐ์ด์ด ๋ถ๋ถ์ ์ผ๋ก ์์๊ฒฝ์ฐ , ์์์์๊ฒฝ์ฐ ๋ฌผ์ํ๋์ค๊ฒ ์ฒ๋ฆฌํ์ต๋๋ค. ์คํ ๋ฆฌ๋ 1,2,3๋ฑ ๋ฐ์ดํฐ์์๋ ์๋ฌ๊ฐ ๋ ์ 3๋ฑ๋ง ์์๊ฒฝ์ฐ๋ง ํ์ธํ์ต๋๋ค.
const { rank, intraId, statusMessage, point, level } = user; | ||
const myIntraId = useRecoilValue(userState).intraId; | ||
const wrapStyle = { | ||
evenOdd: index % 2 === 0 ? styles.even : styles.odd, | ||
topStandard: rank < 4 ? styles.top : styles.standard, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฌ๊ธฐ์ ์๋ฌ๋๋๋ฐ ํ์ธํด์ฃผ์ค ์ ์๋์? rank
์ ํ์
์ด string | number
๋ผ์ <
์ฐ์ฐ์๋ฅผ ์ฌ์ฉํ ์ ์๋ค๋ ๊ฒ ๊ฐ์์...!
์๋ง string์ธ ๊ฒฝ์ฐ์๋ styles.standard
๊ฐ ์ ์ฉ๋์๋ ๊ฒ ๊ฐ์๋ฐ, rank
๊ฐ string์ธ ๊ฒฝ์ฐ๊ฐ ์ ๊ณ ๋ ค๋๊ณ ์๋์ง (์ ์ด์ rank
๊ฐ string์ผ ํ์๊ฐ ์๋์ง?) ํ์ธํด๋ด์ผ ํ ๊ฒ ๊ฐ์ต๋๋ค!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ranklist ๋ฐ์ดํฐ๋ฅผ ์ ์๋ ๊ฐ์ ํ ๋ชจ๋ ๋ถ๋ค์ ๋ฐ์์ ํ๋ฒ๋ ์ํ์๊ฒฝ์ฐ์๋ ๋ญํน์ '-'์ด๋ ๊ฒ ํ์ํ๊ธฐ ์ํด์ ์ฌ์ฉํ์์ต๋๋ค. ํ์ฌ๋ ํ์์์ด์ ์์ ํ์ต๋๋ค.
className={`${ | ||
rank === 1 | ||
? styles.rankNumber1 | ||
: rank === 2 | ||
? styles.rankNumber2 | ||
: styles.rankNumber3 | ||
} ${toggleMode === 'NORMAL' && styles.normal}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด๋ถ๋ถ rank
์ ๊ฐ์ด 1, 2, 3 ๋ฟ์ด๋ผ๋ฉด ${styles[`rankNumber${rank}`]} ์ด๋ฐ ์์ผ๋ก ํ๋ฉด ์ข ๋ ๋ณด๊ธฐ ์ข์ ๊ฒ ๊ฐ๊ธด ํ๋ฐ, ์์์ ๋ง์๋๋ ธ๋๊ฒ์ฒ๋ผ rank
๊ฐ string์ธ ๊ฒฝ์ฐ์ ์ด๋ป๊ฒ ๋ ์ง ๋ด์ผ ํ ๊ฒ ๊ฐ์ต๋๋ค..!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ข์ ๋ฐฉ๋ฒ ๊ฐ์ฌํฉ๋๋ค!
styles/PlayerImage.module.scss
Outdated
@media (max-width: 467px) { | ||
.ranktropy { | ||
div { | ||
@include userImage(4rem); | ||
} | ||
} | ||
.ranktropybig { | ||
div { | ||
@include userImage(5rem); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋๋น์ ๋ฐ๋ผ ํฌ๊ธฐ ๋ค๋ฅด๊ฒ ํ๋๊น ํ์คํ ๋ ์ด์ํ ๊ฒ ๊ฐ๋ค์ ๐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ฐ์ฌํฉ๋๋ค!
styles/rank/RankList.module.scss
Outdated
&.vip { | ||
text-shadow: $text-border-black, 0.3rem 0.3rem 0 $norm-lightblue2; | ||
} | ||
margin-top: -4rem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
margin์ ์์๊ฐ์ ์ฃผ์ ์ด์ ๊ฐ ๋ฌด์์ธ๊ฐ์???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ ธํฐ๋ฐ์ ํ์ดํ์ฌ์ด๊ฐ ๋ฉ์ด์ ์ถ๊ฐํ์๋๋ฐ ํต์ผ๊ฐ์ ์ํด ์ผ๋จ ์ญ์ ํ์ต๋๋ค. ๋ค๋ฅธ ์ข์ ๋ฐฉ๋ฒ ์๊ฐํด๋ณด๋ฉด ์ข์๊ฒ ๊ฐ์์
styles/rank/RankList.module.scss
Outdated
.myRank-text { | ||
pointer-events: auto; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pointer-events: auto
๋ ์ฌ๊ธฐ์ ์ด๋ค ๊ธฐ๋ฅ์ ํ๋๊ฑด๊ฐ์..?
๊ทธ๋ฆฌ๊ณ myRank-text
๋ฅผ ๊ฒ์ํด๋ดค์ ๋ ์ด ํด๋์ค๋ก ์ง์ ๋ ํด๋์ค๊ฐ ์๋ ๊ฒ ๊ฐ์๋ฐ ์ด๋์ ์ฐ์ด๋๊ฑด๊ฐ์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
myrank์ ์ฒด ๋ถ๋ถ์ ํด๋ฆญํ ์ ์๊ฒ ๋์ด ๋ฐฉ๋ฒ์ ์ฐพ๋ ์ค์ ์ญ์ ํ์ด์ผ ํ๋ ๋ถ๋ถ์ ๋๋ค. ํ์ฌ๋ ์ ๊ณผ ๋น์ทํ ๋ฐฉ๋ฒ์ผ๋ก ์์ ํ์ต๋๋ค
-webkit-background-clip: text; | ||
-webkit-text-fill-color: transparent; | ||
background-clip: text; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
background-clip
์์ฑ์ผ๋ก text์๋ง ๋ฐฐ๊ฒฝ์ ์ ์ฉํ ์ ์๋๊ฑด๊ฐ์?? ์ฒ์ ์์๋ค์ ๐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋น๊ทผ ๊ฐ์ฌํฉ๋๋ค!
styles/rank/RankListMain.module.scss
Outdated
} | ||
} | ||
|
||
.rankNumber2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ธ๋ป ๋ดค์ ๋ rankNumber1, 2, 3
๋ค์ ๋น์ทํ ์์ฑ๋ค์ด ๋ง์ ๋ณด์ด๋๋ฐ ๊ฐ๋ฅํ๋ฉด mixin์ผ๋ก ํฉ์น๋ ๊ฒ๋ ๋ณด๊ธฐ์ ์ข์ ๊ฒ ๊ฐ์์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mixin์ ํ์ฉํด์ ์์ ํ์ต๋๋ค.
๐ ๊ฐ์
๐ป ์์ ์ฌํญ
โ ๋ณ๊ฒฝ๋ก์ง