diff --git a/package.json b/package.json index d2554ab..77fd518 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "postcss-nested": "^5.0.5", "ramda": "^0.27.1", "react": "^17.0.1", + "react-cool-dimensions": "^2.0.7", "react-div-100vh": "^0.7.0", "react-dom": "^17.0.1", "react-helmet": "^6.1.0", diff --git a/src/breakpoints.js b/src/breakpoints.js index 97aca46..4729111 100644 --- a/src/breakpoints.js +++ b/src/breakpoints.js @@ -4,7 +4,10 @@ const R = require('ramda') const resolveConfig = require('tailwindcss/resolveConfig'); const tailwindConfig = require('../tailwind.config.js'); const {theme} = resolveConfig(tailwindConfig); -module.exports = R.map(size => parseInt(size, 10), theme.screens); +module.exports = R.pipe( + R.map(size => parseInt(size, 10)), + R.filter(Boolean) +)(theme.screens); `; export default themeBreakpoints; diff --git a/src/components/Nav.js b/src/components/Nav.js index 839855e..a47bc32 100644 --- a/src/components/Nav.js +++ b/src/components/Nav.js @@ -1,6 +1,9 @@ -import React from "react"; +import React, { useState } from "react"; import classnames from "classnames"; import { Link } from "gatsby"; +import useDimensions from "react-cool-dimensions"; + +import ShowMenu from "@spectrum-icons/workflow/ShowMenu"; const getNavClasses = (isClient) => classnames( @@ -8,80 +11,111 @@ const getNavClasses = (isClient) => isClient ? "text-vibrant-light" : "text-gray-200" ); -const Nav = ({ isClient, internalLinks, className }) => ( - -); +