Reduced warnings
parent
95136b6cb0
commit
2c8e86a4c3
|
@ -37,7 +37,7 @@ function App() {
|
|||
mode: window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light',
|
||||
},
|
||||
}),
|
||||
[true],
|
||||
[],
|
||||
);
|
||||
|
||||
return (
|
||||
|
|
|
@ -33,6 +33,7 @@ function loading() {
|
|||
|
||||
export default function EnhancedTable(props) {
|
||||
const [state, dispatch] = useContext(DeviceContext)
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const [ notifState, notifdispatch ] = useContext(SnackbarContext)
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -44,7 +45,7 @@ export default function EnhancedTable(props) {
|
|||
notifdispatch({type: "NEW_TOAST", msg: 'Failed to load bootlogs'})
|
||||
})
|
||||
|
||||
}, []);
|
||||
}, [dispatch, notifdispatch, props]);
|
||||
|
||||
return (
|
||||
<Box sx={{ width: '100%' }}>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
import Box from '@mui/material/Box';
|
||||
import Paper from '@mui/material/Paper';
|
||||
import React, { useContext } from 'react';
|
||||
import React, { } from 'react';
|
||||
//import { JsonFormatter } from 'react-json-formatter'
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
||||
import DeleteIcon from '@mui/icons-material/Delete';
|
||||
import FavoriteBorderIcon from '@mui/icons-material/FavoriteBorder';
|
||||
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
|
||||
|
@ -23,7 +25,7 @@ import * as helpers from "./../../../controllers/helpers"
|
|||
|
||||
function buildContent(row) {
|
||||
return (
|
||||
<TableRow
|
||||
<TableRow
|
||||
hover
|
||||
>
|
||||
|
||||
|
@ -69,14 +71,14 @@ function loading() {
|
|||
}
|
||||
|
||||
export default function EnhancedTable(props) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const [state, dispatch] = useContext(DeviceContext)
|
||||
|
||||
useEffect(() => {
|
||||
deviceController.getCrashlogs(props.dongleId).then((res) => {
|
||||
dispatch({ type: "update_dongle_bootlogs", dongle_id: props.dongleId, bootlogs: res.data })
|
||||
})
|
||||
|
||||
}, []);
|
||||
}, [dispatch, props]);
|
||||
|
||||
console.log("drives", state.dongles[props.dongleId])
|
||||
console.log("drives", typeof state.dongles[props.dongleId])
|
||||
|
|
|
@ -19,6 +19,7 @@ import * as helpers from "./../../../controllers/helpers"
|
|||
export default function SignIn(props) {
|
||||
|
||||
const [state] = useContext(DeviceContext)
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const [notifState, notifdispatch] = useContext(SnackbarContext)
|
||||
|
||||
function pubKeyClipboard(newClip) {
|
||||
|
|
|
@ -18,13 +18,14 @@ import { context as SnackbarContext } from "./../../../context/toast";
|
|||
import * as deviceController from "./../../../controllers/devices";
|
||||
import * as helpers from "./../../../controllers/helpers"
|
||||
import ViewDrive from "./view_drive"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default function EnhancedTable(props) {
|
||||
const [deviceState, dispatch] = useContext(DeviceContext)
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const [ notifState, notifdispatch ] = useContext(SnackbarContext)
|
||||
const [state, setState] = useState({selectedSegment: null})
|
||||
|
||||
|
@ -37,13 +38,13 @@ export default function EnhancedTable(props) {
|
|||
notifdispatch({type: "NEW_TOAST", msg: 'Failed to load drives'})
|
||||
})
|
||||
|
||||
}, []);
|
||||
}, [dispatch, props, notifdispatch]);
|
||||
|
||||
return (
|
||||
<Box sx={{ width: '100%' }}>
|
||||
<Paper sx={{ width: '100%', mb: 2 }}>
|
||||
<TableContainer>
|
||||
<Table
|
||||
<Table
|
||||
sx={{ minWidth: 750 }}
|
||||
aria-labelledby="tableTitle"
|
||||
size={'small'}
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
import DeleteIcon from '@mui/icons-material/Delete';
|
||||
import FavoriteBorderIcon from '@mui/icons-material/FavoriteBorder';
|
||||
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
|
||||
import { Skeleton } from '@mui/material';
|
||||
import Box from '@mui/material/Box';
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import Paper from '@mui/material/Paper';
|
||||
|
@ -12,19 +9,16 @@ import TableContainer from '@mui/material/TableContainer';
|
|||
import TableHead from '@mui/material/TableHead';
|
||||
import TableRow from '@mui/material/TableRow';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import React, { useContext, useState } from 'react';
|
||||
import { context as DeviceContext } from "./../../../context/devices";
|
||||
import { context as SnackbarContext } from "./../../../context/toast";
|
||||
import * as deviceController from "./../../../controllers/devices";
|
||||
import * as helpers from "./../../../controllers/helpers"
|
||||
import Typography from "@mui/material/Typography"
|
||||
|
||||
|
||||
|
||||
|
||||
export default function EnhancedTable(props) {
|
||||
const [deviceState, dispatch] = useContext(DeviceContext)
|
||||
const [notifState, notifdispatch] = useContext(SnackbarContext)
|
||||
const [deviceState] = useContext(DeviceContext)
|
||||
|
||||
const [state, setState] = useState({ loading: true, firstReqSent: false, segment: null, drive: null })
|
||||
|
||||
|
@ -57,7 +51,7 @@ export default function EnhancedTable(props) {
|
|||
|
||||
}
|
||||
|
||||
|
||||
// test
|
||||
|
||||
|
||||
|
||||
|
@ -75,7 +69,6 @@ export default function EnhancedTable(props) {
|
|||
let gitCommit = "";
|
||||
let metadata = {};
|
||||
|
||||
let response = ""
|
||||
|
||||
try {
|
||||
metadata = JSON.parse(drive.metadata);
|
||||
|
@ -103,7 +96,7 @@ export default function EnhancedTable(props) {
|
|||
if (directoryTree) {
|
||||
for (var i in directoryTree.children) {
|
||||
// skip any non-directory entries (for example m3u8 file in the drive directory)
|
||||
if (directoryTree.children[i].type != 'directory') continue;
|
||||
if (directoryTree.children[i].type !== 'directory') continue;
|
||||
|
||||
var segment = directoryTree.children[i].name;
|
||||
|
||||
|
@ -158,7 +151,7 @@ export default function EnhancedTable(props) {
|
|||
{
|
||||
directorySegments ? Object.keys(directorySegments).map((key, index) => {
|
||||
|
||||
{
|
||||
|
||||
return Object.keys(directorySegments[key]).map((key1, index1) => (
|
||||
<TableRow hover>
|
||||
<TableCell >{key}</TableCell>
|
||||
|
@ -175,8 +168,8 @@ export default function EnhancedTable(props) {
|
|||
|
||||
|
||||
</TableRow>
|
||||
))
|
||||
}
|
||||
))
|
||||
|
||||
|
||||
}) : null
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue