From 643064529c7a9ecb53ce07527de2b99e8ff882c2 Mon Sep 17 00:00:00 2001
From: Santhoshkumar <117272529+Santhosh2022ts@users.noreply.github.com>
Date: Sat, 29 Apr 2023 16:07:12 +0530
Subject: [PATCH 1/2] WEB-413 - External broken links - fix (#38)
---
src/components/Footer.jsx | 33 ++++++++++-----------------------
1 file changed, 10 insertions(+), 23 deletions(-)
diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx
index a097fee..ce08ecd 100644
--- a/src/components/Footer.jsx
+++ b/src/components/Footer.jsx
@@ -2,29 +2,16 @@ import React, { Component } from 'react';
import './Footer.scss';
import SubscribeButton from "../components/SubscribeButton"
import FeedbackButtons from "../components/FeedbackButtons"
+import { useLocation } from "@reach/router";
-class Footer extends Component {
- constructor(props) {
- super(props);
-
- this.state = {
- pathRoute: ''
- };
- }
-
- componentDidMount() {
- this.setState({
- pathRoute: window.location.pathname.slice(0, -1),
- });
- }
-
- render() {
- const { pathRoute } = this.state;
- return (
- <>
-
-
-
+const Footer = ()=> {
+ const { pathname } = useLocation();
+ const pathRoute = pathname.slice(0, -1);
+ return (
+ <>
+
+
+