Feat: 푸터 개인정보처리방침, 서비스 약관 추가

This commit is contained in:
정현조 2024-10-08 09:20:44 +09:00
parent 6c5a5f25de
commit abd50f4979
2 changed files with 157 additions and 3 deletions

View File

@ -0,0 +1,31 @@
import { Dialog, DialogContent, DialogOverlay, DialogTitle, DialogClose } from '@radix-ui/react-dialog';
import { X } from 'lucide-react';
interface ModalProps {
title: string;
content: React.ReactNode;
open: boolean;
onClose: () => void;
}
export default function Modal({ title, content, open, onClose }: ModalProps) {
return (
<Dialog
open={open}
onOpenChange={onClose}
>
<DialogOverlay className="fixed inset-0 bg-black/50" />
<DialogContent className="fixed left-1/2 top-1/2 w-[90%] max-w-lg -translate-x-1/2 -translate-y-1/2 transform rounded-lg bg-white p-6 shadow-lg">
<div className="flex items-center justify-between">
<DialogTitle className="text-xl font-bold">{title}</DialogTitle>
<DialogClose asChild>
<button className="text-gray-500 hover:text-black">
<X size={24} />
</button>
</DialogClose>
</div>
<div className="mt-4">{content}</div>
</DialogContent>
</Dialog>
);
}

View File

@ -1,14 +1,18 @@
import * as React from 'react';
import Modal from './Modal';
import { cn } from '@/lib/utils';
export interface FooterProps extends React.HTMLAttributes<HTMLDivElement> {}
export default function Footer({ className, ...props }: FooterProps) {
const [isTermsOpen, setIsTermsOpen] = React.useState(false);
const [isPrivacyOpen, setIsPrivacyOpen] = React.useState(false);
return (
<footer
className={cn('mt-[100px] border-t border-gray-200 bg-gray-100', className)}
{...props}
>
{' '}
<div className="container py-10">
<div className="flex flex-col items-start gap-5">
<div className="relative">
@ -16,12 +20,131 @@ export default function Footer({ className, ...props }: FooterProps) {
<p className="font-body-small mt-2 text-gray-500">Copyright © 2024 WorLabel All rights reserved</p>
</div>
<div className="inline-flex items-center gap-4">
<div className="font-body-small text-gray-500"> </div>
<button
className="font-body-small text-gray-500 hover:text-primary"
onClick={() => setIsTermsOpen(true)}
>
</button>
<div className="h-4 w-px bg-gray-400" />
<div className="font-body-small text-gray-500"> </div>
<button
className="font-body-small text-gray-500 hover:text-primary"
onClick={() => setIsPrivacyOpen(true)}
>
</button>
</div>
</div>
</div>
{/* Terms of Service Modal */}
<Modal
title="서비스 이용약관"
content={
<>
<p>
<strong>1 </strong>
</p>
<p>
WorLabel( "회사") ( "서비스")
.
</p>
<br />
<p>
<strong>2 </strong>
</p>
<p>
1. "서비스" .
<br />
2. "회원" .
</p>
<br />
<p>
<strong>3 </strong>
</p>
<p>
1. , .
<br />
2. , .
</p>
<br />
<p>
<strong>4 </strong>
</p>
<p>
1. .
<br />
2. .
</p>
<br />
<p>
<strong>5 </strong>
</p>
<p>
1. , .
<br />
2. , .
</p>
</>
}
open={isTermsOpen}
onClose={() => setIsTermsOpen(false)}
/>
{/* Privacy Policy Modal */}
<Modal
title="개인정보 처리방침"
content={
<>
<p>
<strong>1 </strong>
</p>
<p>
1. .
<br />
2. 같습니다: 이름, , , , .
</p>
<br />
<p>
<strong>2 </strong>
</p>
<p>
1. :
<br />
- , , .
<br />
2. .
</p>
<br />
<p>
<strong>3 </strong>
</p>
<p>
1. .
<br />
2. , .
</p>
<br />
<p>
<strong>4 3 </strong>
</p>
<p>
1. .
<br />
2. , .
</p>
<br />
<p>
<strong>5 </strong>
</p>
<p>
1. , .
<br />
2. .
</p>
</>
}
open={isPrivacyOpen}
onClose={() => setIsPrivacyOpen(false)}
/>
</footer>
);
}