From 4297285b26897f5b612e959d48f8dddfad743469 Mon Sep 17 00:00:00 2001 From: Yury Shkoda Date: Wed, 20 Oct 2021 16:09:16 +0300 Subject: [PATCH] chore(web): fix build warnings --- web/src/App.tsx | 2 +- web/src/containers/SASjsDrive/index.tsx | 1 - web/src/containers/SASjsDrive/main.tsx | 4 ++-- web/src/containers/SASjsDrive/sideBar.tsx | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/web/src/App.tsx b/web/src/App.tsx index f8a626c..6d4c3d0 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { Route, HashRouter, Switch, Redirect } from 'react-router-dom' +import { Route, HashRouter, Switch } from 'react-router-dom' import { ThemeProvider } from '@mui/material/styles' import { theme } from './theme' diff --git a/web/src/containers/SASjsDrive/index.tsx b/web/src/containers/SASjsDrive/index.tsx index f1c287d..f17c7e8 100644 --- a/web/src/containers/SASjsDrive/index.tsx +++ b/web/src/containers/SASjsDrive/index.tsx @@ -3,7 +3,6 @@ import React, { useState } from 'react' import CssBaseline from '@mui/material/CssBaseline' import Box from '@mui/material/Box' -import Header from '../../components/header' import SideBar from './sideBar' import Main from './main' diff --git a/web/src/containers/SASjsDrive/main.tsx b/web/src/containers/SASjsDrive/main.tsx index bf5121a..fd8b323 100644 --- a/web/src/containers/SASjsDrive/main.tsx +++ b/web/src/containers/SASjsDrive/main.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect, useRef } from 'react' +import React, { useState, useEffect } from 'react' import axios from 'axios' import Editor from '@monaco-editor/react' @@ -28,7 +28,7 @@ const Main = (props: any) => { setFileContent(res.data.fileContent) }) } - }, [props.selectedFilePath]) + }, [props.selectedFilePath, baseUrl]) const handleEditSaveBtnClick = () => { if (!editMode) { diff --git a/web/src/containers/SASjsDrive/sideBar.tsx b/web/src/containers/SASjsDrive/sideBar.tsx index 003fc8d..9311116 100644 --- a/web/src/containers/SASjsDrive/sideBar.tsx +++ b/web/src/containers/SASjsDrive/sideBar.tsx @@ -51,7 +51,7 @@ const SideBar = (props: any) => { }) const queryParams = new URLSearchParams(location.search) props.setSelectedFilePath(queryParams.get('filePath')) - }, []) + }, [baseUrl, location.search, props]) const handleSelect = (node: TreeNode) => { if (!node.children.length) {