1
0
Fork 0
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:
Niels van Velzen 2025-02-24 19:33:01 +01:00
parent 3a9534c5ba
commit 6c370e68c5
2 changed files with 10 additions and 12 deletions

View file

@ -5,7 +5,7 @@ import { useApi } from 'hooks/useApi';
import type { AxiosRequestConfig } from 'axios';
const fetchServerLog = async (
api: Api | undefined,
api: Api,
name: string,
options?: AxiosRequestConfig
) => {
@ -23,7 +23,7 @@ export const useServerLog = (name: string) => {
return useQuery({
queryKey: ['ServerLog', name],
queryFn: ({ signal }) => fetchServerLog(api, name, { signal }),
queryFn: ({ signal }) => fetchServerLog(api!, name, { signal }),
enabled: !!api
});
};

View file

@ -3,16 +3,14 @@ import Page from 'components/Page';
import React, { useCallback } from 'react';
import { useParams } from 'react-router-dom';
import { useServerLog } from 'apps/dashboard/features/logs/api/useServerLog';
import {
Alert,
Box,
Button,
ButtonGroup,
Card,
CardContent,
Container,
Typography
} from '@mui/material';
import Alert from '@mui/material/Alert';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import ButtonGroup from '@mui/material/ButtonGroup';
import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import Container from '@mui/material/Container';
import Typography from '@mui/material/Typography';
import { ContentCopy, FileDownload } from '@mui/icons-material';
import globalize from 'lib/globalize';
import toast from 'components/toast/toast';