Skip to content

Commit

Permalink
chore: make flow without backend api
Browse files Browse the repository at this point in the history
  • Loading branch information
kcwww committed Apr 19, 2024
1 parent 0cd2d59 commit 6bb3530
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion front/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Button = (props: ButtonProps) => {
<StyledButton
color={props.color}
onClick={
props.callback === null
props.callback === undefined
? () => props.view[1](!props.view[0])
: props.callback // temp
}
Expand Down
9 changes: 8 additions & 1 deletion front/src/pages/Make/Snowball/MainDeco/MakeButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ const MakeButton = (props: ButtonProps) => {
{alert ? (
<StyledAlert>스노우볼 이름을 입력해주세요 !</StyledAlert>
) : null}
<StyledButton color={props.color} onClick={ClickedMake}>
<StyledButton
color={props.color}
// onClick={ClickedMake}
onClick={() => {
//temp
navigate('/');
}}
>
{props.text}
</StyledButton>
</MakeButtonWrap>
Expand Down
14 changes: 8 additions & 6 deletions front/src/pages/Make/Snowball/Snowball.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,27 @@ const Snowball = () => {
const [make, setMake] = useState(false);

const [cookie] = useCookies(['loggedin']);
const [{ snowBallData, userData }] = useRecoilState(SnowBallRecoil);
const [{ snowBallData, userData }, setSnowball] =
useRecoilState(SnowBallRecoil);

const maxSnowball = 5;

window.history.pushState({}, '', '/main');
window.history.pushState({}, '', '/make/snowball');

useEffect(() => {
if (!cookie.loggedin) {
logout();
return;
}
// if (!cookie.loggedin) {
// logout();
// return;
// }

if (
userData.nickname === null ||
userData.nickname === undefined ||
userData.nickname === ''
) {
navigate('/make/nickname');
// navigate('/make/nickname');
setSnowball(prev => ({ ...prev, nickname: '김부캠' })); // temp
return;
}

Expand Down

0 comments on commit 6bb3530

Please sign in to comment.