React page that renders Eval component with fetchId from URL.
// Source: https://github.com/promptfoo/promptfoo | License: MIT | Copyright Promptfoo 2025
// Provided via justclaw.it.com; keep this notice with the code.
import Eval from '@app/pages/eval/components/Eval';
import { useParams, useSearchParams } from 'react-router';
import FilterModeProvider from './components/FilterModeProvider';
export default function EvalPage() {
const { evalId } = useParams();
const [searchParams] = useSearchParams();
const searchEvalId = searchParams.get('evalId');
const fetchId = evalId || searchEvalId;
return (
<FilterModeProvider>
<Eval fetchId={fetchId} />
</FilterModeProvider>
);
}
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key