1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-06 06:10:04 +00:00

chore: fix breaking changes caused by react-router-dom update

This commit is contained in:
2022-07-15 18:42:59 +05:00
parent 5e930f14d2
commit 30d7a65358
2 changed files with 14 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
import React, { useState, useEffect, useContext } from 'react'
import { Link, useHistory, useLocation } from 'react-router-dom'
import { Link, useNavigate, useLocation } from 'react-router-dom'
import {
AppBar,
@@ -24,7 +24,7 @@ const baseUrl =
const validTabs = ['/', '/SASjsDrive', '/SASjsStudio']
const Header = (props: any) => {
const history = useHistory()
const navigate = useNavigate()
const { pathname } = useLocation()
const appContext = useContext(AppContext)
const [tabValue, setTabValue] = useState(
@@ -74,7 +74,7 @@ const Header = (props: any) => {
}}
onClick={() => {
setTabValue('/')
history.push('/')
navigate('/')
}}
/>
<Tabs