"use client" import { useEffect, useState } from "react" import { useRouter } from "next/navigation" export default function SelectModels({ models }) { const router = useRouter() const [model1, setModel1] = useState("") const [model2, setModel2] = useState("") useEffect(() => { if (model1 && model2) { router.push(`/compare/${model1}-vs-${model2}`) } }, [model1, model2]) return (