Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Puterism committed Dec 2, 2024
2 parents 9397d8f + b574600 commit 277b793
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions apps/preview/src/pages/ShowPreviewPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@ const getPreviewLink = (showId: number) => {
}

const getShareText = (show: { id: number, title: string, date: Date, placeName: string, streetAddress: string, detailAddress: string }) => {
return `
공연 정보를 공유드려요!
return `공연 정보를 공유드려요!
- 공연명 : ${show.title}
- 일시 : ${format(show.date, 'yyyy.MM.dd (E) / HH:mm -', { locale: ko })}
- 장소 : ${show.placeName} / ${show.streetAddress}, ${show.detailAddress}
공연 상세 정보 ▼
${getPreviewLink(show.id)}
`
${getPreviewLink(show.id)}`
}

const ShowPreviewPage = () => {
Expand Down Expand Up @@ -64,9 +62,7 @@ const ShowPreviewPage = () => {
const shareButtonClickHandler = async () => {
if (navigator.share) {
await navigator.share({
title,
text: getShareText({ id, title, date: new Date(date), placeName, streetAddress, detailAddress }),
url: getPreviewLink(id),
});
} else {
await navigator.clipboard.writeText(getPreviewLink(id));
Expand Down

0 comments on commit 277b793

Please sign in to comment.