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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user