import { useLocation, Navigate } from 'react-router-dom'; import type { ResumeAnalysisResult } from '../types/resumeAnalysis'; import { AnalysisHeader, ScoreCard, CriteriaSection, FeedbackSection, GrammarSection, InjectionWarning, AnalysisActions, } from '../components/analysis'; import '../assets/css/demo.css'; /** * Results page component displaying analysis results * Trace: SDD_LLD_0023 - Display numeric score output * Trace: SDD_LLD_0024 - Display criteria breakdown results * Trace: SDD_LLD_0025 - Display summary, strengths, weaknesses * Trace: SDD_LLD_0026 - Display grammar rating * Trace: SDD_HLD_0014 - Display results of output to user through UI * Trace: SDD_LLD_0028 - Provide navigation across UI pages (redirect when no data) */ export default function ResultsPage() { const location = useLocation(); // Redirect to home page if user navigates directly without analysis data // Trace: SDD_LLD_0028 - Provide navigation across UI pages if (!location.state) { return ; } const analysisData: ResumeAnalysisResult = location.state as ResumeAnalysisResult; return (
Resume Analysis Results } subtitle="Your resume has been analyzed against the job requirements" /> {/* Trace: SRD_NonFuncReq_0010 - Display prompt injection warning if detected */} {/* Trace: SRD_QualAssurReq_0005 - Alert user of neutralized injection attempts */} {/* Trace: SDD_LLD_0023 - Renders final percentage score and criteria ratings */} {/* Trace: SDD_HLD_0010 - Generate graded subsection categories on scale from 1-10 */} {/* Trace: SDD_LLD_0024 - Display criteria breakdown results */} {/* Trace: SDD_HLD_0009 - Decompose output into job description criteria-based subsections */} {/* Trace: SDD_LLD_0025 - Display summary, strengths, weaknesses */} {/* Trace: SDD_HLD_0011 - Generate strengths and weaknesses found in resumes */} {/* Trace: SDD_LLD_0026 - Display grammar rating */} {/* Trace: SRD_FuncReq_0010 - Display grammar/spelling score */} {/* Trace: SRD_FuncReq_0011 - Display grammar corrections */} {/* Trace: SRD_InterfaceReq_0010 - Display rating of grammar and spelling errors */} {/* Trace: SRD_FuncReq_0018 - Allow user to download response as JSON file */}
); }