Compare commits

...

3 Commits

Author SHA1 Message Date
Ishan Uniyal
05de988a67 fix: updated testcase 2026-03-09 09:37:22 +05:30
Ishan Uniyal
53ed4b47b8 fix: updated fallback color 2026-03-09 09:12:49 +05:30
Amaresh S M
7213754e71 fix: change clearInterval to clearTimeout (#10507)
Some checks failed
Release Drafter / update_release_draft (push) Has been cancelled
build-staging / prepare (push) Has been cancelled
build-staging / staging (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
Co-authored-by: Vinicius Lourenço <12551007+H4ad@users.noreply.github.com>
2026-03-07 13:05:41 +05:30
3 changed files with 5 additions and 5 deletions

View File

@@ -249,7 +249,7 @@ function AppLayout(props: AppLayoutProps): JSX.Element {
}
return (): void => {
clearInterval(timer);
clearTimeout(timer);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [

View File

@@ -4,8 +4,8 @@ import { getColorsForSeverityLabels, isRedLike } from '../utils';
describe('getColorsForSeverityLabels', () => {
it('should return slate for blank labels', () => {
expect(getColorsForSeverityLabels('', 0)).toBe(Color.BG_SLATE_300);
expect(getColorsForSeverityLabels(' ', 0)).toBe(Color.BG_SLATE_300);
expect(getColorsForSeverityLabels('', 0)).toBe(Color.BG_VANILLA_400);
expect(getColorsForSeverityLabels(' ', 0)).toBe(Color.BG_VANILLA_400);
});
it('should return correct colors for known severity variants', () => {

View File

@@ -79,7 +79,7 @@ export function getColorsForSeverityLabels(
const trimmed = label.trim();
if (!trimmed) {
return Color.BG_SLATE_300;
return Color.BG_VANILLA_400; // Default color for empty labels
}
const variantColor = SEVERITY_VARIANT_COLORS[trimmed];
@@ -119,6 +119,6 @@ export function getColorsForSeverityLabels(
return (
SAFE_FALLBACK_COLORS[index % SAFE_FALLBACK_COLORS.length] ||
Color.BG_SLATE_400
Color.BG_VANILLA_400
);
}