mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
fix: logo text
This commit is contained in:
parent
a26cc56172
commit
537ac3fbc9
@ -20,9 +20,14 @@ interface LogoProps extends React.ComponentPropsWithoutRef<"a"> {
|
||||
}
|
||||
|
||||
export const JSONCrackLogo: React.FC<LogoProps> = ({ fontSize = "1.2rem", ...props }) => {
|
||||
const logoText = React.useMemo(() => {
|
||||
if (typeof window === "undefined") return "JSON CRACK";
|
||||
return isIframe() ? "JC" : "JSON CRACK";
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<StyledTitle as={Link} fontSize={fontSize} href="/" prefetch={false} {...props}>
|
||||
{isIframe() ? "JC" : "JSON CRACK"}
|
||||
{logoText}
|
||||
</StyledTitle>
|
||||
);
|
||||
};
|
||||
|
@ -1,6 +1,5 @@
|
||||
export function isIframe() {
|
||||
try {
|
||||
if (window === undefined) return false;
|
||||
return window.self !== window.top;
|
||||
} catch (e) {
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user