Skip to content

Commit 3ac3969

Browse files
committed
기본 빙고 보드 잘못 들어가는 부분 수정
1 parent 5424439 commit 3ac3969

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/modules/Home/Home.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import {
88
createBingoBoard,
99
getBingoBoard,
1010
} from "../../api/bingo_api";
11+
import {
12+
defafultBingoBoard,
13+
shuffleArray,
14+
} from "../Bingo/components/DefaultBingoBoard";
1115

1216
const StyledContainer = styled(Container)({
1317
textAlign: "center",
@@ -38,10 +42,8 @@ const Home = () => {
3842

3943
const bingoData = await getBingoBoard(loginId);
4044
if (bingoData.length == 0) {
41-
const boardData: {
42-
[key: string]: { value: string; status: number; selected: number };
43-
} = {};
44-
await createBingoBoard(result.user_id, boardData);
45+
let bingoBoard = shuffleArray(defafultBingoBoard);
46+
await createBingoBoard(result.user_id, bingoBoard);
4547
}
4648

4749
window.location.href = "/bingo";

0 commit comments

Comments
 (0)