Quick UI fixes (#10695)

* Quick fixes

* remove log
This commit is contained in:
Nicolas Mowen 2024-03-26 18:54:00 -06:00 committed by GitHub
parent 8f69edeb33
commit d945e77443
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 3 deletions

View File

@ -167,14 +167,13 @@ export default function ExportDialog({
>
{EXPORT_OPTIONS.map((opt) => {
return (
<div className="flex items-center gap-2">
<div key={opt} className="flex items-center gap-2">
<RadioGroupItem
className={
opt == selectedOption
? "from-selected/50 to-selected/90 text-selected bg-selected"
: "from-secondary/50 to-secondary/90 text-secondary bg-secondary"
}
key={opt}
id={opt}
value={opt}
/>

View File

@ -69,7 +69,20 @@ export default function Events() {
}, [last24Hours, reviewSearchParams]);
// we want to update the items whenever the severity changes
useEffect(() => setBeforeTs(Date.now() / 1000), [severity]);
useEffect(() => {
if (recording) {
return;
}
const now = Date.now() / 1000;
if (now - beforeTs > 60) {
setBeforeTs(now);
}
// only refresh when severity changes
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [severity]);
const reviewSegmentFetcher = useCallback((key: Array<string> | string) => {
const [path, params] = Array.isArray(key) ? key : [key, undefined];

View File

@ -151,6 +151,7 @@ export default function SubmitPlus() {
return (
<div
key={event.id}
className="w-full rounded-2xl aspect-video flex justify-center items-center bg-black cursor-pointer"
onClick={() => setUpload(event)}
>