Skip to content

Commit d97781b

Browse files
authored
Merge branch 'master' into meshery
2 parents 1aa36e5 + e46a68b commit d97781b

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/sections/General/Footer/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from "react";
22
import { Link } from "gatsby";
33
import { Container, Row, Col } from "../../../reusecore/Layout";
4-
import { useLocation } from "@reach/router";
54
import logo from "../../../assets/images/layer5/layer5-only/svg/layer5-light-bg.svg";
65
import SocialLinksColor from "../../../components/SocialLinks-Color";
76
import Button from "../../../reusecore/Button";
@@ -10,8 +9,7 @@ import bubblesElement from "./images/bubbles-element.svg";
109

1110
const Footer = ({ location: locationProp }) => {
1211
var currentYear = new Date().getFullYear();
13-
const routerLocation = useLocation();
14-
const pathname = locationProp?.pathname || routerLocation?.pathname || "/";
12+
const pathname = locationProp?.pathname || (typeof window !== "undefined" ? window.location.pathname : "/");
1513

1614
const getUrl = (pathname) => {
1715
// remove ".html" that results in live production build

0 commit comments

Comments
 (0)