import { createRootRoute, type ErrorComponentProps, Outlet, useMatchRoute, useNavigate, useRouter, } from "@tanstack/react-router"; import { useState } from "react"; import "../app.css"; import { CandidateForm } from "../components/CandidateForm"; import { ConfirmDialog } from "../components/ConfirmDialog"; import { ExternalLinkDialog } from "../components/ExternalLinkDialog"; import { ItemForm } from "../components/ItemForm"; import { OnboardingWizard } from "../components/OnboardingWizard"; import { SlideOutPanel } from "../components/SlideOutPanel"; import { TotalsBar } from "../components/TotalsBar"; import { useAuth } from "../hooks/useAuth"; import { useDeleteCandidate } from "../hooks/useCandidates"; import { useOnboardingComplete } from "../hooks/useSettings"; import { useResolveThread, useThread } from "../hooks/useThreads"; import { useUIStore } from "../stores/uiStore"; export const Route = createRootRoute({ component: RootLayout, errorComponent: RootErrorBoundary, }); function RootErrorBoundary({ error, reset }: ErrorComponentProps) { const router = useRouter(); return (
{error instanceof Error ? error.message : "An unexpected error occurred"}
Are you sure you want to delete{" "} {candidateName}? This action cannot be undone.
Pick {candidateName} as the winner? This will add it to your collection and archive the thread.