Skip to content

Commit

Permalink
feat: [FE] 방생성 로직 작성
Browse files Browse the repository at this point in the history
방생성 버튼을 누르는 경우, UUID값에 따라 방을 새롭게 생성하고, 해당 방으로 이동하는 기능 구현
(#32)
  • Loading branch information
d0422 committed Nov 14, 2023
1 parent 77bb2b8 commit 968baee
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frontEnd/src/pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { v4 as uuidv4 } from 'uuid';
import { useNavigate } from 'react-router-dom';
import Button from '@/components/Button';

export default function Home() {
const handleClick = () => {};
const navigate = useNavigate();

const handleClick = () => {
const roomId = uuidv4();
navigate(`/${roomId}`);
};

return (
<div className="h-[100vh] w-[100vw] bg-backgroundColor flex justify-center items-center py-[10vw] ">
Expand Down

0 comments on commit 968baee

Please sign in to comment.