From d33bc993ad64ec2e7cb32a6680cc80f20d07838f Mon Sep 17 00:00:00 2001 From: Dan Head Date: Thu, 21 Jan 2021 22:06:31 +0000 Subject: [PATCH] fix: warnings --- src/components/card.js | 4 +-- src/components/header-logo.js | 8 +++--- src/components/header.js | 47 ----------------------------------- src/components/nav.js | 12 ++++----- 4 files changed, 12 insertions(+), 59 deletions(-) diff --git a/src/components/card.js b/src/components/card.js index a638da3..46e1bca 100644 --- a/src/components/card.js +++ b/src/components/card.js @@ -9,7 +9,7 @@ const Container = styled.div` margin: 0 calc(var(--spacing-x-xs) * -1) var(--spacing-y-sm); @media (max-width: 30em) { - &:nth-child(even) { + &:nth-of-type(even) { flex-direction: row-reverse; } } @@ -35,7 +35,7 @@ const Link = styled(GatsbyLink)` } @media (max-width: 30em) { - &:nth-child(even) ${Container} { + &:nth-of-type(even) ${Container} { flex-direction: row-reverse; } } diff --git a/src/components/header-logo.js b/src/components/header-logo.js index c8e4fee..f5ea93d 100644 --- a/src/components/header-logo.js +++ b/src/components/header-logo.js @@ -18,11 +18,11 @@ const Top = styled.div` transition: opacity 0.5s ease-in, filter 0.5s ease-in 0.5s, transform 0.5s ease-in 0.5s; - path:first-child { + path:first-of-type { fill: var(--theme-color-primary); } - path:last-child { + path:last-of-type { fill: var(--theme-color-secondary); } @@ -55,11 +55,11 @@ const Bottom = styled.div` transition: opacity 0.5s ease-in, filter 0.5s ease-in 0.5s, transform 0.5s ease-in 0.5s; - path:first-child { + path:first-of-type { fill: var(--theme-color-dark); } - path:last-child { + path:last-of-type { fill: var(--theme-color-secondary); } diff --git a/src/components/header.js b/src/components/header.js index 34c0b7a..40dd5cd 100644 --- a/src/components/header.js +++ b/src/components/header.js @@ -26,50 +26,3 @@ export default function Header({ image, children }) { ); } -/* - -import React, { useState } from "react"; -import styled from "@emotion/styled"; -import MenuButton from "./menu-button"; -import Nav from "./nav"; - -const Container = styled.header` - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 10; - display: flex; - background-color: rgba(0, 0, 0, 0.25); - color: white; -`; - -const Content = styled.div` - max-width: var(--theme-max-width); - flex-grow: 1; - margin: 0 auto; - padding: 0 var(--spacing-x-xs); -`; - -const Menu = styled.div` - padding: 0 var(--spacing-x-xs); - @media (min-width: 40rem) { - display: none; - } -`; - -export default function Header() { - const [navOpen, setNavOpen] = useState(); - const handleMenuClick = () => setNavOpen(!navOpen); - return ( - - -