diff --git a/src/components/Modal/JoinLeague/JoinLeague.tsx b/src/components/Modal/JoinLeague/JoinLeague.tsx index b727732..d16e092 100644 --- a/src/components/Modal/JoinLeague/JoinLeague.tsx +++ b/src/components/Modal/JoinLeague/JoinLeague.tsx @@ -34,7 +34,7 @@ const JoinLeague = ({ onClose, channelLink }: JoinLeagueProps) => { await authAPI.get(SERVER_URL + `/api/participant/stat/${gameIdVal}/${gameTagVal}`) ).data.tier; setTier(userTier); - setGameId(gameIdVal); + setGameId(gameIdVal + '#' + gameTagVal); }; const nicknameHandler: MouseEventHandler = () => { diff --git a/src/config/index.ts b/src/config/index.ts index 4917907..4b84ec2 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -1,4 +1,4 @@ -let SERVER_URL = 'http://leaguehub.co.kr'; +let SERVER_URL = 'http://leaguehub.co.kr:8080'; const SOCKET_URL = 'ws://leaguehub.co.kr/ws/websocket'; if (process.env.NODE_ENV === 'development') { diff --git a/src/pages/contents/[channelLink]/main.tsx b/src/pages/contents/[channelLink]/main.tsx index ae3c55c..44dfb2a 100644 --- a/src/pages/contents/[channelLink]/main.tsx +++ b/src/pages/contents/[channelLink]/main.tsx @@ -1,7 +1,6 @@ import authAPI from '@apis/authAPI'; import HomeCard from '@components/Card/HomeCard'; import MainContentModify from '@components/Content/MainContentModify'; -import Loading from '@components/Loading/Loading'; import styled from '@emotion/styled'; import useChannels from '@hooks/useChannels'; import { useQuery } from '@tanstack/react-query'; @@ -37,7 +36,7 @@ const Main = () => { const { channelPermission } = useChannels(); const channelLink = router.query.channelLink; - const { data, isLoading, isSuccess } = useQuery( + const { data, isSuccess } = useQuery( ['getMainContents', channelLink], () => { return fetchData(channelLink as string); @@ -48,14 +47,14 @@ const Main = () => { if (isSuccess && data) setMainContents(data); }, [isSuccess]); - if (isLoading) { - return ; - } - const handleContentUpdate = async (updatedContent: MainContent) => { if (!channelLink) return; - const res = await authAPI({ method: 'post', url: `/api/channel/${channelLink}/main` }); + const res = await authAPI({ + method: 'post', + url: `/api/channel/${channelLink}/main`, + data: updatedContent, + }); if (res.status !== 200) return router.push('/'); setMainContents(updatedContent);