Minor lint fixes

This commit is contained in:
Reckless_Satoshi 2024-01-15 09:33:47 +00:00
parent 87d217ab6b
commit f7b504cea7
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
9 changed files with 14 additions and 14 deletions

View File

@ -26,8 +26,7 @@ export interface OpenDialogs {
}
const MainDialogs = (): JSX.Element => {
const { open, setOpen, settings, clientVersion, hostUrl } =
useContext<UseAppStoreType>(AppContext);
const { open, setOpen, settings, clientVersion } = useContext<UseAppStoreType>(AppContext);
const { federation } = useContext<UseFederationStoreType>(FederationContext);
return (

View File

@ -17,14 +17,14 @@ import {
import RobotAvatar from '../../components/RobotAvatar';
import { AppContext, type UseAppStoreType, closeAll } from '../../contexts/AppContext';
import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageContext';
import { FederationContext, UseFederationStoreType } from '../../contexts/FederationContext';
import { FederationContext, type UseFederationStoreType } from '../../contexts/FederationContext';
const NavBar = (): JSX.Element => {
const theme = useTheme();
const { t } = useTranslation();
const { page, setPage, settings, setSlideDirection, open, setOpen, windowSize, navbarHeight } =
useContext<UseAppStoreType>(AppContext);
const { garage, orderUpdatedAt, robotUpdatedAt } = useContext<UseGarageStoreType>(GarageContext);
const { garage, robotUpdatedAt } = useContext<UseGarageStoreType>(GarageContext);
const { setCurrentOrderId } = useContext<UseFederationStoreType>(FederationContext);
const navigate = useNavigate();
@ -82,7 +82,7 @@ const NavBar = (): JSX.Element => {
const lastOrderId = slot?.getRobot(slot?.lastShortAlias ?? '')?.lastOrderId;
const param =
newPage === 'order' ? `${shortAlias}/${String(activeOrderId ?? lastOrderId)}` : '';
if (shortAlias && (activeOrderId || lastOrderId)) {
if (newPage === 'order') {
setCurrentOrderId({ id: activeOrderId ?? lastOrderId, shortAlias });
}
setTimeout(() => {

View File

@ -9,7 +9,6 @@ import OrderDetails from '../../components/OrderDetails';
import { AppContext, closeAll, type UseAppStoreType } from '../../contexts/AppContext';
import { FederationContext, type UseFederationStoreType } from '../../contexts/FederationContext';
import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageContext';
import { type Order } from '../../models';
import { WarningDialog } from '../../components/Dialogs';
const OrderPage = (): JSX.Element => {

View File

@ -22,7 +22,7 @@ import { AppContext, type UseAppStoreType } from '../../contexts/AppContext';
import { genBase62Token } from '../../utils';
import { LoadingButton } from '@mui/lab';
import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageContext';
import { FederationContext, UseFederationStoreType } from '../../contexts/FederationContext';
import { FederationContext, type UseFederationStoreType } from '../../contexts/FederationContext';
interface RobotProfileProps {
robot: Robot;

View File

@ -654,9 +654,11 @@ const CoordinatorDialog = ({ open = false, onClose, network, shortAlias }: Props
}
rel='noreferrer'
>
{`${coordinator?.[settings.network][
settings.selfhostedClient ? 'onion' : origin
]}`}
{`${String(
coordinator?.[settings.network][
settings.selfhostedClient ? 'onion' : origin
],
)}`}
</Link>
</ListItemText>
</ListItem>

View File

@ -31,7 +31,7 @@ import { UserNinjaIcon } from '../Icons';
import { getWebln } from '../../utils';
import { signCleartextMessage } from '../../pgp';
import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageContext';
import { FederationContext, UseFederationStoreType } from '../../contexts/FederationContext';
import { FederationContext, type UseFederationStoreType } from '../../contexts/FederationContext';
interface Props {
coordinator: Coordinator;

View File

@ -4,7 +4,7 @@ import React, {
useEffect,
useState,
type SetStateAction,
ReactNode,
type ReactNode,
} from 'react';
import { type Page } from '../basic/NavBar';
import { type OpenDialogs } from '../basic/MainDialogs';

View File

@ -6,7 +6,7 @@ import React, {
type SetStateAction,
useMemo,
useContext,
ReactNode,
type ReactNode,
} from 'react';
import { type Order, Federation } from '../models';

View File

@ -4,7 +4,7 @@ import React, {
useState,
type SetStateAction,
useEffect,
ReactNode,
type ReactNode,
} from 'react';
import { defaultMaker, type Maker, Garage } from '../models';