Skip to content

Commit

Permalink
🐛 Fix SSG error in header
Browse files Browse the repository at this point in the history
  • Loading branch information
macdonst committed Nov 9, 2020
1 parent 76f9b88 commit 6e0970f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { createRef, useEffect, useRef, useState } from 'react'
import { Link, withPrefix } from 'gatsby'
import { Adobe } from '../Icons'
import { ActionButton, Divider, Flex, View } from '@adobe/react-spectrum'
import { cloneElement } from '../utils'
import { cloneElement, isExternal } from '../utils'
import {
Tabs,
TabsIndicator,
Expand All @@ -27,7 +27,6 @@ import {
import Menu from '@spectrum-icons/workflow/ShowMenu'

import { useMediaQuery } from 'react-responsive'
import isExternal from 'is-url-external'

const stretched = css`
height: 100%;
Expand Down
2 changes: 2 additions & 0 deletions src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,5 @@ export const findSelectedPageSiblings = (pathname, pages) => {

return siblings
}

export const isExternal = (url) => /^https?:\/\//.test(url)

0 comments on commit 6e0970f

Please sign in to comment.