import React from 'react'; import { Container, Text, Button, Checkbox, Group, useMantineColorScheme } from '@mantine/core'; import { Dropzone } from '@mantine/dropzone'; import AddIcon from '@mui/icons-material/Add'; import { useTranslation } from 'react-i18next'; import { useFileHandler } from '../../hooks/useFileHandler'; import { useFilesModalContext } from '../../contexts/FilesModalContext'; const LandingPage = () => { const { addMultipleFiles } = useFileHandler(); const fileInputRef = React.useRef(null); const { colorScheme } = useMantineColorScheme(); const { t } = useTranslation(); const { openFilesModal } = useFilesModalContext(); const [isUploadHover, setIsUploadHover] = React.useState(false); const handleFileDrop = async (files: File[]) => { await addMultipleFiles(files); }; const handleOpenFilesModal = () => { openFilesModal(); }; const handleNativeUploadClick = () => { fileInputRef.current?.click(); }; const handleFileSelect = async (event: React.ChangeEvent) => { const files = Array.from(event.target.files || []); if (files.length > 0) { await addMultipleFiles(files); } // Reset the input so the same file can be selected again event.target.value = ''; }; return ( {/* White PDF Page Background */}
Stirling PDF Logo
{/* Logo positioned absolutely in top right corner */} {/* Centered content container */}
{/* Stirling PDF Branding */} Stirling PDF {/* Add Files + Native Upload Buttons */}
setIsUploadHover(false)} >
{/* Hidden file input for native file picker */}
{/* Instruction Text */} {t('fileUpload.dropFilesHere', 'Drop files here or click to upload')}
); }; export default LandingPage;