Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setTimeAgo(format(event.emittedAt, "en_US"));
}, 1000);
return () => {
window.clearInterval(timer);
};
}, []);
const eventKindToTitle = (eventKind: string): string => {
eventKind[0].toUpperCase();
const sPart = eventKind.substring(1).replace(/-/g, " ");
return eventKind.substring(0, 1).toUpperCase() + sPart;
};
const borderColor = useColorModeValue(theme.colors.gray["900"], theme.colors.gray["600"]);
const highLightColor = useColorModeValue(theme.colors.gray["50"], theme.colors.gray["700"]);
return (
const timer = setInterval(() => {
setTimeAgo(format(event.emittedAt, "en_US"));
}, 1000);
return () => {
window.clearInterval(timer);
};
}, []);
const eventKindToTitle = (eventKind: string): string => {
eventKind[0].toUpperCase();
const sPart = eventKind.substring(1).replace(/-/g, " ");
return eventKind.substring(0, 1).toUpperCase() + sPart;
};
const borderColor = useColorModeValue(theme.colors.gray["900"], theme.colors.gray["600"]);
const highLightColor = useColorModeValue(theme.colors.gray["50"], theme.colors.gray["700"]);
return (
const Header: FC = ({
initialTitle,
hashtag,
onSettings,
brand = "SUPERSENSE",
lightColor = "teal.200",
darkColor = "teal.700",
}: HeaderProps) => {
const { colorMode, toggleColorMode } = useColorMode();
const bgColor = useColorModeValue(lightColor, darkColor);
const changeColorModeIcon = useColorModeValue(
,
);
return (
const Header: FC = ({
initialTitle,
hashtag,
onSettings,
brand = "SUPERSENSE",
lightColor = "teal.200",
darkColor = "teal.700",
}: HeaderProps) => {
const { colorMode, toggleColorMode } = useColorMode();
const bgColor = useColorModeValue(lightColor, darkColor);
const changeColorModeIcon = useColorModeValue(
,
);
return (