mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-19 17:23:19 +00:00
Minor lint fixes
This commit is contained in:
@ -26,8 +26,7 @@ export interface OpenDialogs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const MainDialogs = (): JSX.Element => {
|
const MainDialogs = (): JSX.Element => {
|
||||||
const { open, setOpen, settings, clientVersion, hostUrl } =
|
const { open, setOpen, settings, clientVersion } = useContext<UseAppStoreType>(AppContext);
|
||||||
useContext<UseAppStoreType>(AppContext);
|
|
||||||
const { federation } = useContext<UseFederationStoreType>(FederationContext);
|
const { federation } = useContext<UseFederationStoreType>(FederationContext);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -17,14 +17,14 @@ import {
|
|||||||
import RobotAvatar from '../../components/RobotAvatar';
|
import RobotAvatar from '../../components/RobotAvatar';
|
||||||
import { AppContext, type UseAppStoreType, closeAll } from '../../contexts/AppContext';
|
import { AppContext, type UseAppStoreType, closeAll } from '../../contexts/AppContext';
|
||||||
import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageContext';
|
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 NavBar = (): JSX.Element => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { page, setPage, settings, setSlideDirection, open, setOpen, windowSize, navbarHeight } =
|
const { page, setPage, settings, setSlideDirection, open, setOpen, windowSize, navbarHeight } =
|
||||||
useContext<UseAppStoreType>(AppContext);
|
useContext<UseAppStoreType>(AppContext);
|
||||||
const { garage, orderUpdatedAt, robotUpdatedAt } = useContext<UseGarageStoreType>(GarageContext);
|
const { garage, robotUpdatedAt } = useContext<UseGarageStoreType>(GarageContext);
|
||||||
const { setCurrentOrderId } = useContext<UseFederationStoreType>(FederationContext);
|
const { setCurrentOrderId } = useContext<UseFederationStoreType>(FederationContext);
|
||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@ -82,7 +82,7 @@ const NavBar = (): JSX.Element => {
|
|||||||
const lastOrderId = slot?.getRobot(slot?.lastShortAlias ?? '')?.lastOrderId;
|
const lastOrderId = slot?.getRobot(slot?.lastShortAlias ?? '')?.lastOrderId;
|
||||||
const param =
|
const param =
|
||||||
newPage === 'order' ? `${shortAlias}/${String(activeOrderId ?? lastOrderId)}` : '';
|
newPage === 'order' ? `${shortAlias}/${String(activeOrderId ?? lastOrderId)}` : '';
|
||||||
if (shortAlias && (activeOrderId || lastOrderId)) {
|
if (newPage === 'order') {
|
||||||
setCurrentOrderId({ id: activeOrderId ?? lastOrderId, shortAlias });
|
setCurrentOrderId({ id: activeOrderId ?? lastOrderId, shortAlias });
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -9,7 +9,6 @@ import OrderDetails from '../../components/OrderDetails';
|
|||||||
import { AppContext, closeAll, type UseAppStoreType } from '../../contexts/AppContext';
|
import { AppContext, closeAll, type UseAppStoreType } from '../../contexts/AppContext';
|
||||||
import { FederationContext, type UseFederationStoreType } from '../../contexts/FederationContext';
|
import { FederationContext, type UseFederationStoreType } from '../../contexts/FederationContext';
|
||||||
import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageContext';
|
import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageContext';
|
||||||
import { type Order } from '../../models';
|
|
||||||
import { WarningDialog } from '../../components/Dialogs';
|
import { WarningDialog } from '../../components/Dialogs';
|
||||||
|
|
||||||
const OrderPage = (): JSX.Element => {
|
const OrderPage = (): JSX.Element => {
|
||||||
|
@ -22,7 +22,7 @@ import { AppContext, type UseAppStoreType } from '../../contexts/AppContext';
|
|||||||
import { genBase62Token } from '../../utils';
|
import { genBase62Token } from '../../utils';
|
||||||
import { LoadingButton } from '@mui/lab';
|
import { LoadingButton } from '@mui/lab';
|
||||||
import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageContext';
|
import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageContext';
|
||||||
import { FederationContext, UseFederationStoreType } from '../../contexts/FederationContext';
|
import { FederationContext, type UseFederationStoreType } from '../../contexts/FederationContext';
|
||||||
|
|
||||||
interface RobotProfileProps {
|
interface RobotProfileProps {
|
||||||
robot: Robot;
|
robot: Robot;
|
||||||
|
@ -654,9 +654,11 @@ const CoordinatorDialog = ({ open = false, onClose, network, shortAlias }: Props
|
|||||||
}
|
}
|
||||||
rel='noreferrer'
|
rel='noreferrer'
|
||||||
>
|
>
|
||||||
{`${coordinator?.[settings.network][
|
{`${String(
|
||||||
settings.selfhostedClient ? 'onion' : origin
|
coordinator?.[settings.network][
|
||||||
]}`}
|
settings.selfhostedClient ? 'onion' : origin
|
||||||
|
],
|
||||||
|
)}`}
|
||||||
</Link>
|
</Link>
|
||||||
</ListItemText>
|
</ListItemText>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
@ -31,7 +31,7 @@ import { UserNinjaIcon } from '../Icons';
|
|||||||
import { getWebln } from '../../utils';
|
import { getWebln } from '../../utils';
|
||||||
import { signCleartextMessage } from '../../pgp';
|
import { signCleartextMessage } from '../../pgp';
|
||||||
import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageContext';
|
import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageContext';
|
||||||
import { FederationContext, UseFederationStoreType } from '../../contexts/FederationContext';
|
import { FederationContext, type UseFederationStoreType } from '../../contexts/FederationContext';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
coordinator: Coordinator;
|
coordinator: Coordinator;
|
||||||
|
@ -4,7 +4,7 @@ import React, {
|
|||||||
useEffect,
|
useEffect,
|
||||||
useState,
|
useState,
|
||||||
type SetStateAction,
|
type SetStateAction,
|
||||||
ReactNode,
|
type ReactNode,
|
||||||
} from 'react';
|
} from 'react';
|
||||||
import { type Page } from '../basic/NavBar';
|
import { type Page } from '../basic/NavBar';
|
||||||
import { type OpenDialogs } from '../basic/MainDialogs';
|
import { type OpenDialogs } from '../basic/MainDialogs';
|
||||||
|
@ -6,7 +6,7 @@ import React, {
|
|||||||
type SetStateAction,
|
type SetStateAction,
|
||||||
useMemo,
|
useMemo,
|
||||||
useContext,
|
useContext,
|
||||||
ReactNode,
|
type ReactNode,
|
||||||
} from 'react';
|
} from 'react';
|
||||||
|
|
||||||
import { type Order, Federation } from '../models';
|
import { type Order, Federation } from '../models';
|
||||||
|
@ -4,7 +4,7 @@ import React, {
|
|||||||
useState,
|
useState,
|
||||||
type SetStateAction,
|
type SetStateAction,
|
||||||
useEffect,
|
useEffect,
|
||||||
ReactNode,
|
type ReactNode,
|
||||||
} from 'react';
|
} from 'react';
|
||||||
|
|
||||||
import { defaultMaker, type Maker, Garage } from '../models';
|
import { defaultMaker, type Maker, Garage } from '../models';
|
||||||
|
Reference in New Issue
Block a user