diff --git a/src/App.tsx b/src/App.tsx index 5621968..b5259d0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useCallback } from 'react'; -import { motion, AnimatePresence } from 'motion/react'; +import { motion, AnimatePresence, useReducedMotion } from 'motion/react'; import { AppState, PaperSize } from './types'; import { FileUpload } from './components/FileUpload'; import { StyleSelector } from './components/StyleSelector'; @@ -82,6 +82,7 @@ const KeyboardShortcutsHelp: React.FC<{ isOpen: boolean; onClose: () => void }> }; const App: React.FC = () => { + const prefersReducedMotion = useReducedMotion(); const [appState, setAppState] = useState(AppState.UPLOAD); const [content, setContent] = useState(''); const [inputFileName, setInputFileName] = useState(''); @@ -276,6 +277,8 @@ const App: React.FC = () => { ? + setShowShortcuts(true)} role="button" aria-label="Show keyboard shortcuts">? + {appState !== AppState.UPLOAD && ( { -

{style.description}

+

{style.description}

diff --git a/src/main.tsx b/src/main.tsx index bce7f44..f6d0ae2 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,6 +1,7 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App'; +import { ErrorBoundary } from './components/ErrorBoundary'; import './index.css'; const rootElement = document.getElementById('root'); @@ -11,6 +12,8 @@ if (!rootElement) { const root = ReactDOM.createRoot(rootElement); root.render( - + + + );