-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OPIK-91] [UX improvements] Implement the Experiment configuration se…
…ction in the compare page (#250)
- Loading branch information
1 parent
7bff92c
commit 7f86dee
Showing
25 changed files
with
847 additions
and
326 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
apps/opik-frontend/src/api/datasets/useExperimenstByIds.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { QueryFunctionContext, useQueries } from "@tanstack/react-query"; | ||
import { | ||
getExperimentById, | ||
UseExperimentByIdParams, | ||
} from "@/api/datasets/useExperimentById"; | ||
|
||
type UseExperimentsByIdsParams = { | ||
experimentsIds: string[]; | ||
}; | ||
|
||
export default function useExperimentsByIds(params: UseExperimentsByIdsParams) { | ||
return useQueries({ | ||
queries: params.experimentsIds.map((experimentId) => { | ||
const p: UseExperimentByIdParams = { | ||
experimentId, | ||
}; | ||
|
||
return { | ||
queryKey: ["experiment", p], | ||
queryFn: (context: QueryFunctionContext) => | ||
getExperimentById(context, p), | ||
}; | ||
}), | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.