EvalPage (eval/page.tsx)

promptfoo · src/app/src/pages/eval/page.tsx · typescript · MIT
ui, tag:embed-classified

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