Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

fix: simplify LogoProps interface and clean up JSONCrackLogo component

AykutSaraccdd7a80b73c2
diff --git a/apps/www/src/layout/JSONCrackBrandLogo.tsx b/apps/www/src/layout/JSONCrackBrandLogo.tsx
index 04149359..f85922e0 100644
--- a/apps/www/src/layout/JSONCrackBrandLogo.tsx
+++ b/apps/www/src/layout/JSONCrackBrandLogo.tsx
@@ -29,13 +29,13 @@ const StyledTitle = styled.span<{ fontSize: string }>`
mix-blend-mode: difference;
`;
-interface LogoProps extends React.ComponentPropsWithoutRef<"div"> {
+interface LogoProps {
fontSize?: string;
hideLogo?: boolean;
hideText?: boolean;
}
-export const JSONCrackLogo = ({ fontSize = "1.2rem", hideText, hideLogo, ...props }: LogoProps) => {
+export const JSONCrackLogo = ({ fontSize = "1.2rem", hideText, hideLogo }: LogoProps) => {
const handleLogoClick = React.useCallback((event: React.MouseEvent<HTMLAnchorElement>) => {
if (typeof window === "undefined") return;
if (!window.location.href.includes("widget")) return;
@@ -58,11 +58,7 @@ export const JSONCrackLogo = ({ fontSize = "1.2rem", hideText, hideLogo, ...prop
mb="2"
/>
)}
- {!hideText && (
- <StyledTitle fontSize={fontSize} {...props}>
- JSON CRACK
- </StyledTitle>
- )}
+ {!hideText && <StyledTitle fontSize={fontSize}>JSON CRACK</StyledTitle>}
</StyledLogoWrapper>
</Link>
);