Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const PageHeader = () => {
const data = useStaticQuery(graphql`
query HeaderQuery {
logo: file(absolutePath: { regex: "/logo.png/" }) {
childImageSharp {
fixed(width: 48, height: 48) {
...GatsbyImageSharpFixed
}
}
}
}
`);
const { logo } = data;
const styles = useStyles();
const screen = useScreen();
return (
{({ location }) => {
const shouldRenderLogo =
screen !== 'xs' || (screen === 'xs' && location.pathname === '/');
return (
{shouldRenderLogo && (