diff --git a/frontend/src/components/Footer/Modal.tsx b/frontend/src/components/Footer/Modal.tsx new file mode 100644 index 0000000..3424e9a --- /dev/null +++ b/frontend/src/components/Footer/Modal.tsx @@ -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 ( + + + +
+ {title} + + + +
+
{content}
+
+
+ ); +} diff --git a/frontend/src/components/Footer/index.tsx b/frontend/src/components/Footer/index.tsx index 4459e8f..edf63d6 100644 --- a/frontend/src/components/Footer/index.tsx +++ b/frontend/src/components/Footer/index.tsx @@ -1,14 +1,18 @@ import * as React from 'react'; +import Modal from './Modal'; import { cn } from '@/lib/utils'; - export interface FooterProps extends React.HTMLAttributes {} export default function Footer({ className, ...props }: FooterProps) { + const [isTermsOpen, setIsTermsOpen] = React.useState(false); + const [isPrivacyOpen, setIsPrivacyOpen] = React.useState(false); + return ( ); } diff --git a/frontend/src/components/ImagePreSignedForm/index.tsx b/frontend/src/components/ImagePreSignedForm/index.tsx index 4705f6a..daace94 100644 --- a/frontend/src/components/ImagePreSignedForm/index.tsx +++ b/frontend/src/components/ImagePreSignedForm/index.tsx @@ -148,8 +148,7 @@ export default function ImagePreSignedForm({ onProgress: (progress) => { setUploadStatus((prevStatus) => { const completedFiles = Math.round((progress / 100) * files.length); - const newStatus = prevStatus.map((status, index) => (index < completedFiles ? 'success' : status)); - return newStatus; + return prevStatus.map((status, index) => (index < completedFiles ? 'success' : status)); }); }, useSingleUpload: uploadType === 'file', @@ -166,7 +165,7 @@ export default function ImagePreSignedForm({ } }; - const totalProgress = Math.round((uploadStatus.filter((status) => status !== null).length / files.length) * 100); + const totalProgress = Math.round((uploadStatus.filter((status) => status === 'success').length / files.length) * 100); useEffect(() => { onFileCount(files.length); diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx index c8c0498..14be38c 100644 --- a/frontend/src/pages/Home.tsx +++ b/frontend/src/pages/Home.tsx @@ -42,7 +42,6 @@ export default function Home() { asChild variant="blue" size="lg" - className="mt-8" > 시작하기