diff --git a/__mocks__/@clerk/clerk-react.tsx b/__mocks__/@clerk/clerk-react.tsx index 52f00b83..c9dc06b0 100644 --- a/__mocks__/@clerk/clerk-react.tsx +++ b/__mocks__/@clerk/clerk-react.tsx @@ -8,14 +8,29 @@ export function Protect({ children }: React.PropsWithChildren) { return children; } +/** + * Render a placeholder UI indicating a redirect to the sign-in page. + * + * @returns A JSX element that displays "Redirecting...". + */ export function RedirectToSignIn(): JSX.Element { return
Redirecting...
; } +/** + * Displays a simple redirecting indicator for the sign-up flow. + * + * @returns A JSX element that renders the text "Redirecting...". + */ export function RedirectToSignUp(): JSX.Element { return
Redirecting...
; } +/** + * Displays content intended for authenticated users. + * + * @returns A JSX element that renders the text "Signed In". + */ export function SignedIn(): JSX.Element { return
Signed In
; } diff --git a/src/App.tsx b/src/App.tsx index d43b6bea..953fb68b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -34,6 +34,15 @@ if (!PUBLISHABLE_KEY) { throw new Error('Missing Publishable Key'); } +/** + * Root application component that configures providers, global layout, and routes. + * + * Renders authentication and data providers, the theme wrapper, navigation bar, and the app's route tree + * (including payment result pages, settings, auth redirects, and the main tasks view). Tracks the last + * "today" selection and scrolls the main content to top when the route changes. + * + * @returns The root JSX element containing auth and query providers, theme wrapper, navigation, and routes. + */ export function App(): JSX.Element { const [lastToday, setLastToday] = useState(); const ref = useRef();