lmnr-ai / lmnr

Laminar - open-source all-in-one platform for engineering AI products. Crate data flywheel for you AI app. Traces, Evals, Datasets, Labels. YC S24.
https://www.lmnr.ai
Apache License 2.0
1.17k stars 58 forks source link

minor fixes to react render #241

Closed dinmukhamedm closed 1 day ago

dinmukhamedm commented 1 day ago
  1. Update route using useEffect because on some loads there was a warning about setting state while rendering
  2. Force type cast instead of convert so that we don't use Mono like it is not intended. This is hacky, but better than silently stringifying internal react.

[!IMPORTANT] Fixes rendering warning in EvaluationsGroupsBar and enforces type casting in MonoWithCopy.

  • Behavior:
    • Use useEffect in EvaluationsGroupsBar to update route after rendering, preventing state-setting warnings.
    • Force type cast children to string in MonoWithCopy to ensure correct usage, avoiding silent stringification.
  • Files:
    • evaluations-groups-bar.tsx: Wraps router logic in useEffect.
    • mono-with-copy.tsx: Adds type casting for children prop.

This description was created by Ellipsis for 670775b1eda2a007ff70e5b31c30a3d75dfe6e1f. It will automatically update as commits are pushed.