Skip to content

Commit

Permalink
기본 빙고 보드 잘못 들어가는 부분 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
4roring committed Nov 22, 2024
1 parent 5424439 commit 3ac3969
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/modules/Home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import {
createBingoBoard,
getBingoBoard,
} from "../../api/bingo_api";
import {
defafultBingoBoard,
shuffleArray,
} from "../Bingo/components/DefaultBingoBoard";

const StyledContainer = styled(Container)({
textAlign: "center",
Expand Down Expand Up @@ -38,10 +42,8 @@ const Home = () => {

const bingoData = await getBingoBoard(loginId);
if (bingoData.length == 0) {
const boardData: {
[key: string]: { value: string; status: number; selected: number };
} = {};
await createBingoBoard(result.user_id, boardData);
let bingoBoard = shuffleArray(defafultBingoBoard);
await createBingoBoard(result.user_id, bingoBoard);
}

window.location.href = "/bingo";
Expand Down

0 comments on commit 3ac3969

Please sign in to comment.