Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
goeun208 committed Mar 12, 2024
1 parent 37a4cad commit 14e8dc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/components/common/button/url/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import KakaoTalk from '@assets/participate/icon_kakao_talk.svg';
import Copy from '@assets/participate/icon_copy.svg';
import { handleCopyClipBoard } from '@/utils/copyUrl';
import { useEffect } from 'react';
import { useRecoilValue } from 'recoil';
import { groupIdAtom } from '@/states/groupIdAtom';

interface UrlProps {
pathname: string;
Expand All @@ -10,6 +12,7 @@ interface UrlProps {

const UrlButton = ({ pathname, teamname }: UrlProps) => {
const baseURL = 'https://www.moidot.co.kr'; // 배포 url로 변경하기
const groupIdAtom = useRecoilValue(groupIdAtom);
useEffect(() => {
console.log(pathname.split('/').slice(-1)[0]);
console.log('yayayay', pathname);
Expand Down Expand Up @@ -46,7 +49,7 @@ const UrlButton = ({ pathname, teamname }: UrlProps) => {
<div className="flex w-[90vw] desktop:w-[440px] justify-between items-center text-b3 text-font_black mx-auto">
<div
className="flex items-center cursor-pointer text-b2"
onClick={() => handleCopyClipBoard(`${baseURL}${pathname}`)}>
onClick={() => handleCopyClipBoard(`${baseURL}/invite/${groupIdAtom.groupId}`)}>
URL 복사하기
<Copy className="ml-2" />
</div>
Expand Down
4 changes: 0 additions & 4 deletions src/pages/main/[id].tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import DefaultLayout from '@/components/common/layout/defaultLayout';
import Main from '@/components/main';
import { GetServerSideProps } from 'next';
import { useEffect } from 'react';

const MainPage = (props: any) => {
console.log(props, 'props');
useEffect(() => {
location.reload();
}, []);
return (
<>
{props && (
Expand Down

0 comments on commit 14e8dc4

Please sign in to comment.