Frontend: unified /runs URL (#3912)

This commit is contained in:
Jonathan Dobson
2025-11-05 09:48:55 -05:00
committed by GitHub
parent 2fa4d933cc
commit fcc3f30ba4
27 changed files with 388 additions and 66 deletions

View File

@@ -0,0 +1,17 @@
import { useParams } from "react-router-dom";
/**
* Given a list of parameter names, returns the value of the first one that exists in the URL parameters.
*/
const useFirstParam = (...paramNames: string[]) => {
const params = useParams();
for (const name of paramNames) {
const value = params[name];
if (value) {
return value;
}
}
return null;
};
export { useFirstParam };