Skip to content

Commit

Permalink
fix: EventPageLayout이 사용되지 않는 경우, 기존 meta 태그가 보이도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Todari committed Oct 10, 2024
1 parent a996050 commit 474aa8e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/src/pages/EventPage/EventPageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {Flex, Icon, IconButton, MainLayout, TopNav} from '@HDesign/index';

import {isMobileDevice} from '@utils/detectDevice';
import {updateMetaTag} from '@utils/udpateMetaTag';
import {useEffect} from 'react';

export type EventPageContextProps = Event & {
isAdmin: boolean;
Expand Down Expand Up @@ -41,7 +42,13 @@ const EventPageLayout = () => {
kakaoShare();
};

updateMetaTag('og:title', `행동대장이 "${eventSummary.eventName}"에 대한 정산을 요청했어요`);
useEffect(() => {
updateMetaTag('og:title', `행동대장이 "${eventSummary.eventName}"에 대한 정산을 요청했어요`);

return () => {
updateMetaTag('og:title', '행동대장 - 쉽고 빠른 모임 정산 및 송금 서비스');
};
}, []);

return (
<MainLayout backgroundColor="gray">
Expand Down

0 comments on commit 474aa8e

Please sign in to comment.