Skip to content

Commit

Permalink
build: fix deploy settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Cllaude99 committed Nov 2, 2024
1 parent f8fe8fd commit 7202bf4
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/components/Modal/PlaceModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,25 @@ export default function PlaceModal({ isOpen, onClose }: ModalProps) {
localStorage.removeItem('refreshToken');
localStorage.removeItem('roomId');
if (selectedOption === 'friend') {
const { data } = await axios.post(BACKEND_URL + '/api/rooms', {
roomType: ROOM_TYPE_EACH,
});
const { data } = await axios.post(
BACKEND_URL + '/api/rooms',
{
roomType: ROOM_TYPE_EACH,
},
{ withCredentials: true },
);
setRoomId(data.data.id);
setCurrentView('shareLink');
} else {
const { data } = await axios.post(BACKEND_URL + '/api/rooms', {
roomType: ROOM_TYPE_ALONE,
});
const { data } = await axios.post(
BACKEND_URL + '/api/rooms',
{
roomType: ROOM_TYPE_ALONE,
},
{
withCredentials: true,
},
);
const newRoomId = data.data.id;
navigate(`/page/a/results/${newRoomId}`);
}
Expand Down

0 comments on commit 7202bf4

Please sign in to comment.