Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
crossorigin
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.min.css"
/>
<meta property="og:image" content="/og/intern_hasha_opengraph.png" />
<meta property="og:site_name" content="인턴하샤" />
<meta property="og:description" content="커피챗으로 구하는 스타트업 인턴" />
<!-- Google tag (gtag.js) -->
<script
async
Expand Down
Binary file added public/og/intern_hasha_opengraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions src/components/button/LinkCopyButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { Copy } from 'lucide-react';
import { toast } from 'sonner';

import { Button } from '@/components/ui/button';

export const LinkCopyButton = ({
companyName,
title,
}: {
companyName: string;
title: string;
}) => {
const handleCopyLink = () => {
const currentUrl = window.location.href;

// 가독성을 높인 복사 문구 생성
const copyText = [
`📢 인턴하샤에서 ${companyName}의 ${title} 모집 공고를 확인해보세요!`,
currentUrl,
].join('\n');

navigator.clipboard
.writeText(copyText)
.then(() => {
toast('링크가 복사되었습니다.');
})
.catch(() => {
toast.error('링크 복사 중 오류가 발생했습니다.');
});
};

return (
<Button onClick={handleCopyLink} variant="outline">
<Copy size={16} />
<span>공유하기</span>
</Button>
);
};
27 changes: 17 additions & 10 deletions src/feature/post/ui/detail/PostDetailView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { toast } from 'sonner';

import { DownloadButtonWithPresignedUrl } from '@/components/button/DownloadButtonWithPresignedUrl';
import { LinkButton } from '@/components/button/LinkButton';
import { LinkCopyButton } from '@/components/button/LinkCopyButton';
import { ClosePostModal } from '@/components/modal/ClosePostModal';
import { SignInForBookmarkModal } from '@/components/modal/SignInForBookmarkModal';
import { SignInForCoffeeChatModal } from '@/components/modal/SignInForCoffeChatModal';
Expand Down Expand Up @@ -182,16 +183,22 @@ export const PostDetailView = ({ postId }: { postId: string }) => {
</div>
<div className="flex flex-col flex-wrap gap-3 xs:flex-row md:flex-col">
{role !== 'COMPANY' && (
<Button
onClick={() => {
handleClickApplyCoffeeChat({ id: postId });
}}
disabled={coffeeChatStatus?.isSubmitted}
>
{(coffeeChatStatus?.isSubmitted ?? false)
? '커피챗 신청완료'
: '커피챗 신청하기'}
</Button>
<>
<LinkCopyButton
companyName={company.companyName}
title={position.positionTitle}
/>
<Button
onClick={() => {
handleClickApplyCoffeeChat({ id: postId });
}}
disabled={coffeeChatStatus?.isSubmitted}
>
{(coffeeChatStatus?.isSubmitted ?? false)
? '커피챗 신청완료'
: '커피챗 신청하기'}
</Button>
</>
)}
{author.id === userId && (
<Button
Expand Down