mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-28 23:03:31 +03:00
Minor lint fixes
This commit is contained in:
parent
87d217ab6b
commit
f7b504cea7
@ -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 (
|
||||
|
@ -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(() => {
|
||||
|
@ -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 => {
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
@ -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';
|
||||
|
@ -6,7 +6,7 @@ import React, {
|
||||
type SetStateAction,
|
||||
useMemo,
|
||||
useContext,
|
||||
ReactNode,
|
||||
type ReactNode,
|
||||
} from 'react';
|
||||
|
||||
import { type Order, Federation } from '../models';
|
||||
|
@ -4,7 +4,7 @@ import React, {
|
||||
useState,
|
||||
type SetStateAction,
|
||||
useEffect,
|
||||
ReactNode,
|
||||
type ReactNode,
|
||||
} from 'react';
|
||||
|
||||
import { defaultMaker, type Maker, Garage } from '../models';
|
||||
|
Loading…
Reference in New Issue
Block a user