mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Address review feedback
This commit is contained in:
parent
3a9534c5ba
commit
6c370e68c5
2 changed files with 10 additions and 12 deletions
|
@ -5,7 +5,7 @@ import { useApi } from 'hooks/useApi';
|
||||||
import type { AxiosRequestConfig } from 'axios';
|
import type { AxiosRequestConfig } from 'axios';
|
||||||
|
|
||||||
const fetchServerLog = async (
|
const fetchServerLog = async (
|
||||||
api: Api | undefined,
|
api: Api,
|
||||||
name: string,
|
name: string,
|
||||||
options?: AxiosRequestConfig
|
options?: AxiosRequestConfig
|
||||||
) => {
|
) => {
|
||||||
|
@ -23,7 +23,7 @@ export const useServerLog = (name: string) => {
|
||||||
|
|
||||||
return useQuery({
|
return useQuery({
|
||||||
queryKey: ['ServerLog', name],
|
queryKey: ['ServerLog', name],
|
||||||
queryFn: ({ signal }) => fetchServerLog(api, name, { signal }),
|
queryFn: ({ signal }) => fetchServerLog(api!, name, { signal }),
|
||||||
enabled: !!api
|
enabled: !!api
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,16 +3,14 @@ import Page from 'components/Page';
|
||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import { useServerLog } from 'apps/dashboard/features/logs/api/useServerLog';
|
import { useServerLog } from 'apps/dashboard/features/logs/api/useServerLog';
|
||||||
import {
|
import Alert from '@mui/material/Alert';
|
||||||
Alert,
|
import Box from '@mui/material/Box';
|
||||||
Box,
|
import Button from '@mui/material/Button';
|
||||||
Button,
|
import ButtonGroup from '@mui/material/ButtonGroup';
|
||||||
ButtonGroup,
|
import Card from '@mui/material/Card';
|
||||||
Card,
|
import CardContent from '@mui/material/CardContent';
|
||||||
CardContent,
|
import Container from '@mui/material/Container';
|
||||||
Container,
|
import Typography from '@mui/material/Typography';
|
||||||
Typography
|
|
||||||
} from '@mui/material';
|
|
||||||
import { ContentCopy, FileDownload } from '@mui/icons-material';
|
import { ContentCopy, FileDownload } from '@mui/icons-material';
|
||||||
import globalize from 'lib/globalize';
|
import globalize from 'lib/globalize';
|
||||||
import toast from 'components/toast/toast';
|
import toast from 'components/toast/toast';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue