-
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-217] Ranklist-api #969
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1583ddd
[Feta] [GGFE-217] api test
fabe2f6
[Feat] [GGFE-217] api์์ธ์ฒ๋ฆฌ
2e91edf
[Style] [GGFE-217] tierName ์์๋ณ๊ฒฝ
63c4be8
[Feat] [GGFE-217] ์ฃผ์์ ๊ฑฐ
897ac65
[Feat] [GGFE-217] ์ด๋ฆ ๋ณ๊ฒฝ
38a33b1
Merge branch 'main' into GGFE-217-ranklist-api
parksangmin1543 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
import { useState, useEffect } from 'react'; | ||
import { useState } from 'react'; | ||
import { useSetRecoilState } from 'recoil'; | ||
import { CoinResult } from 'types/coinTypes'; | ||
import { Modal } from 'types/modalTypes'; | ||
import { instance } from 'utils/axios'; | ||
import { mockInstance } from 'utils/mockAxios'; | ||
import { errorState } from 'utils/recoil/error'; | ||
import { modalState } from 'utils/recoil/modal'; | ||
import CoinPopcon from 'components/modal/CoinPopcon'; | ||
import useAxiosGet from 'hooks/useAxiosGet'; | ||
import styles from 'styles/modal/event/WelcomeModal.module.scss'; | ||
|
||
export default function WelcomeModal() { | ||
|
@@ -22,35 +20,16 @@ export default function WelcomeModal() { | |
'42GG์ ์ค์ ๊ฑธ ํ์ํฉ๋๋ค.\n๋น์ ์ ํ๋ณตํ ํ๊ตฌ ์ํ์\n์์ํฉ๋๋ค! ์ด์ด์ด...', | ||
}; | ||
|
||
/* const postCoinHandler = async() => { | ||
const postCoinHandler = async () => { | ||
try { | ||
const res = await instance.post( | ||
`/pingpong/users/attendance` | ||
); | ||
const res = await instance.post(`/pingpong/users/attendance`); | ||
setCoin(res.data); | ||
return res.data; | ||
} catch (error) { | ||
setError('SM01'); | ||
} | ||
}; | ||
|
||
useEffect(() => { | ||
postCoinHandler(); | ||
}, []); */ | ||
|
||
const getCoinHandler = async () => { | ||
try { | ||
const res = await mockInstance.get(`/users/attendance`); | ||
if (res && res.data) { | ||
setCoin(res.data); | ||
return res.data; | ||
} | ||
} catch (error) { | ||
setError('SM01'); | ||
return null; | ||
} | ||
}; | ||
|
||
const openPageManual = () => { | ||
window.open( | ||
'https://github.com/42organization/42arcade.gg.client/wiki/42gg.kr--%ED%8E%98%EC%9D%B4%EC%A7%80-%EA%B0%80%EC%9D%B4%EB%93%9C' | ||
|
@@ -60,8 +39,7 @@ export default function WelcomeModal() { | |
const openAttendanceCoin = async () => { | ||
try { | ||
setButtonState(true); | ||
const updatedCoin = await getCoinHandler(); | ||
//const updatedCoin = await postCoinHandler(); | ||
const updatedCoin = await postCoinHandler(); | ||
|
||
if (!updatedCoin) return null; | ||
|
||
|
@@ -79,16 +57,6 @@ export default function WelcomeModal() { | |
} | ||
}; | ||
|
||
const openStatChangeModal = () => { | ||
setModal({ | ||
modalName: 'FIXED-STAT', | ||
exp: { | ||
gameId: 0, | ||
mode: 'RANK', | ||
}, | ||
}); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<div className={styles.container}> | ||
|
@@ -108,11 +76,10 @@ export default function WelcomeModal() { | |
<div className={styles.positive}> | ||
<input | ||
onClick={openAttendanceCoin} | ||
// onClick={openStatChangeModal} | ||
type='button' | ||
value='์ถ์ํ๊ธฐ' | ||
/> | ||
{buttonState && <CoinPopcon amount={10} coin={1} />} | ||
{buttonState && <CoinPopcon amount={8} coin={1} />} | ||
Comment on lines
-115
to
+82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ์ด๊ฑฐ ์ฝ์ธ ์ ์ฑ ๋ฐ๋์์ ๋ ๋ค์ด๊ฐ๋ ๊ฐ๋ ๊ฐ์ด ๋ฐ๋์ด์ผ ํ ๊ฒ ๊ฐ์ต๋๋ค ๐ฅธ |
||
</div> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
์ฌ๊ธฐ๋ !== undefined ๋ง๊ณ ๊ทธ๋ฅ colorMode ๋ง ์ฐ๋๊ฒ ๋ ๊น๋ํ ๊ฒ ๊ฐ์์