Skip to content

Commit

Permalink
Merge pull request #78 from eunji-0623/feature-황은지
Browse files Browse the repository at this point in the history
Fix: 문의 채팅 버튼이 뜨지 않는 오류 수정
  • Loading branch information
eunji-0623 authored Aug 5, 2024
2 parents fda3af3 + 8e20b26 commit c099828
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions components/ActivityDetails/ActivityDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ import { darkModeState } from '@/states/themeState';
import { ShareButton } from '../ShareButton/ShareButton';
import { ViewedActivitiesState } from '@/states/ViewedState';
import { ViewedActivityProps } from '../ViewedActivities/ViewedActivities.type';
import useLoginState from '@/hooks/useLoginState';
import profileThumbnail from '@/public/image/profile-circle-icon-512x512-zxne30hp.png';
import SendChat from '../Chat/SendChat';

export default function ActivityDetails({ id }: ActivityDetailsProps) {
const router = useRouter();
const [isOpen, setIsOpen] = useState(false);
const isDarkMode = useRecoilValue(darkModeState);
const isLogined = useLoginState();
const [currentPage, setCurrentPage] = useState<number>(
router.query.page ? parseInt(router.query.page as string, 10) : 1
);
Expand Down Expand Up @@ -203,14 +206,24 @@ export default function ActivityDetails({ id }: ActivityDetailsProps) {
</div>
</div>
</div>
<div className="flex t:items-center m:items-end">
<ShareButton
type="none-bg"
title={activityData?.title}
bannerImageUrl={activityData?.bannerImageUrl}
description={activityData?.description}
activityId={id}
/>
<div className="flex items-center t:items-center m:items-center">
<div className="flex gap-[12px]">
{isLogined.isLoggedIn && !isAuthor && (
<SendChat
receiver={Number(activityData?.userId)}
activityId={Number(activityData?.id)}
activityTitle={String(activityData?.title)}
activityImage={String(activityData?.bannerImageUrl)}
/>
)}
<ShareButton
type="none-bg"
title={activityData?.title}
bannerImageUrl={activityData?.bannerImageUrl}
description={activityData?.description}
activityId={id}
/>
</div>
{isAuthor && (
<div className="flex items-center">
<MeatballButton onClick={toggleMenu} />
Expand Down

0 comments on commit c099828

Please sign in to comment.