mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-05 16:25:16 -04:00
refactor(gui): Reorganize imports
This commit is contained in:
parent
ef7c1abcaf
commit
956a26d181
22 changed files with 51 additions and 51 deletions
|
@ -1,12 +1,12 @@
|
|||
import { Box, makeStyles, CssBaseline } from "@material-ui/core";
|
||||
import { createTheme, ThemeProvider } from "@material-ui/core/styles";
|
||||
import { Box, CssBaseline, makeStyles } from "@material-ui/core";
|
||||
import { indigo } from "@material-ui/core/colors";
|
||||
import { MemoryRouter as Router, Routes, Route } from "react-router-dom";
|
||||
import { createTheme, ThemeProvider } from "@material-ui/core/styles";
|
||||
import { Route, MemoryRouter as Router, Routes } from "react-router-dom";
|
||||
import Navigation, { drawerWidth } from "./navigation/Navigation";
|
||||
import HelpPage from "./pages/help/HelpPage";
|
||||
import HistoryPage from "./pages/history/HistoryPage";
|
||||
import SwapPage from "./pages/swap/SwapPage";
|
||||
import WalletPage from "./pages/wallet/WalletPage";
|
||||
import HelpPage from "./pages/help/HelpPage";
|
||||
import GlobalSnackbarProvider from "./snackbar/GlobalSnackbarProvider";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Drawer, makeStyles, Box } from "@material-ui/core";
|
||||
import NavigationHeader from "./NavigationHeader";
|
||||
import { Box, Drawer, makeStyles } from "@material-ui/core";
|
||||
import NavigationFooter from "./NavigationFooter";
|
||||
import NavigationHeader from "./NavigationHeader";
|
||||
|
||||
export const drawerWidth = 240;
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import RedditIcon from "@material-ui/icons/Reddit";
|
||||
import GitHubIcon from "@material-ui/icons/GitHub";
|
||||
import { Box, makeStyles } from "@material-ui/core";
|
||||
import LinkIconButton from "../icons/LinkIconButton";
|
||||
import UnfinishedSwapsAlert from "../alert/UnfinishedSwapsAlert";
|
||||
import GitHubIcon from "@material-ui/icons/GitHub";
|
||||
import RedditIcon from "@material-ui/icons/Reddit";
|
||||
import FundsLeftInWalletAlert from "../alert/FundsLeftInWalletAlert";
|
||||
import RpcStatusAlert from "../alert/RpcStatusAlert";
|
||||
import DiscordIcon from "../icons/DiscordIcon";
|
||||
import { DISCORD_URL } from "../pages/help/ContactInfoBox";
|
||||
import MoneroWalletRpcUpdatingAlert from "../alert/MoneroWalletRpcUpdatingAlert";
|
||||
import RpcStatusAlert from "../alert/RpcStatusAlert";
|
||||
import UnfinishedSwapsAlert from "../alert/UnfinishedSwapsAlert";
|
||||
import DiscordIcon from "../icons/DiscordIcon";
|
||||
import LinkIconButton from "../icons/LinkIconButton";
|
||||
import { DISCORD_URL } from "../pages/help/ContactInfoBox";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
outer: {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Box, List } from "@material-ui/core";
|
||||
import SwapHorizOutlinedIcon from "@material-ui/icons/SwapHorizOutlined";
|
||||
import HistoryOutlinedIcon from "@material-ui/icons/HistoryOutlined";
|
||||
import AccountBalanceWalletIcon from "@material-ui/icons/AccountBalanceWallet";
|
||||
import HelpOutlineIcon from "@material-ui/icons/HelpOutline";
|
||||
import HistoryOutlinedIcon from "@material-ui/icons/HistoryOutlined";
|
||||
import SwapHorizOutlinedIcon from "@material-ui/icons/SwapHorizOutlined";
|
||||
import RouteListItemIconButton from "./RouteListItemIconButton";
|
||||
import UnfinishedSwapsBadge from "./UnfinishedSwapsCountBadge";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ListItem, ListItemIcon, ListItemText } from "@material-ui/core";
|
||||
import { ReactNode } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { ListItem, ListItemIcon, ListItemText } from "@material-ui/core";
|
||||
|
||||
export default function RouteListItemIconButton({
|
||||
name,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { useState } from "react";
|
||||
import { Box, IconButton, TextField } from "@material-ui/core";
|
||||
import SearchIcon from "@material-ui/icons/Search";
|
||||
import CloseIcon from "@material-ui/icons/Close";
|
||||
import SearchIcon from "@material-ui/icons/Search";
|
||||
import { useState } from "react";
|
||||
|
||||
export function ExpandableSearchBox({
|
||||
query,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import TreeView from "@material-ui/lab/TreeView";
|
||||
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
|
||||
import ChevronRightIcon from "@material-ui/icons/ChevronRight";
|
||||
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
|
||||
import TreeItem from "@material-ui/lab/TreeItem";
|
||||
import TreeView from "@material-ui/lab/TreeView";
|
||||
import ScrollablePaperTextBox from "./ScrollablePaperTextBox";
|
||||
|
||||
interface JsonTreeViewProps {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import Button, { ButtonProps } from "@material-ui/core/Button";
|
||||
import CircularProgress from "@material-ui/core/CircularProgress";
|
||||
import React from "react";
|
||||
|
||||
interface LoadingButtonProps extends ButtonProps {
|
||||
loading: boolean;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Box, Chip, Typography } from "@material-ui/core";
|
||||
import { useMemo, useState } from "react";
|
||||
import { CliLog } from "models/cliModel";
|
||||
import { useMemo, useState } from "react";
|
||||
import { logsToRawString } from "utils/parseUtils";
|
||||
import ScrollablePaperTextBox from "./ScrollablePaperTextBox";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Typography } from "@material-ui/core";
|
||||
import DepositAddressInfoBox from "../../modal/swap/DepositAddressInfoBox";
|
||||
import MoneroIcon from "../../icons/MoneroIcon";
|
||||
import DepositAddressInfoBox from "../../modal/swap/DepositAddressInfoBox";
|
||||
|
||||
const XMR_DONATE_ADDRESS =
|
||||
"87jS4C7ngk9EHdqFFuxGFgg8AyH63dRUoULshWDybFJaP75UA89qsutG5B1L1QTc4w228nsqsv8EjhL7bz8fB3611Mh98mg";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Button, Typography } from "@material-ui/core";
|
||||
import { useState } from "react";
|
||||
import InfoBox from "../../modal/swap/InfoBox";
|
||||
import FeedbackDialog from "../../modal/feedback/FeedbackDialog";
|
||||
import InfoBox from "../../modal/swap/InfoBox";
|
||||
|
||||
export default function FeedbackInfoBox() {
|
||||
const [showDialog, setShowDialog] = useState(false);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Box, makeStyles } from "@material-ui/core";
|
||||
import ContactInfoBox from "./ContactInfoBox";
|
||||
import FeedbackInfoBox from "./FeedbackInfoBox";
|
||||
import DonateInfoBox from "./DonateInfoBox";
|
||||
import TorInfoBox from "./TorInfoBox";
|
||||
import FeedbackInfoBox from "./FeedbackInfoBox";
|
||||
import RpcControlBox from "./RpcControlBox";
|
||||
import TorInfoBox from "./TorInfoBox";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
outer: {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { Box, makeStyles } from "@material-ui/core";
|
||||
import FolderOpenIcon from "@material-ui/icons/FolderOpen";
|
||||
import PlayArrowIcon from "@material-ui/icons/PlayArrow";
|
||||
import StopIcon from "@material-ui/icons/Stop";
|
||||
import { RpcProcessStateType } from "models/rpcModel";
|
||||
import IpcInvokeButton from "renderer/components/IpcInvokeButton";
|
||||
import { useAppSelector } from "store/hooks";
|
||||
import StopIcon from "@material-ui/icons/Stop";
|
||||
import PlayArrowIcon from "@material-ui/icons/PlayArrow";
|
||||
import { RpcProcessStateType } from "models/rpcModel";
|
||||
import InfoBox from "../../modal/swap/InfoBox";
|
||||
import CliLogsBox from "../../other/RenderedCliLog";
|
||||
import FolderOpenIcon from "@material-ui/icons/FolderOpen";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
actionsOuter: {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Box, makeStyles, Typography } from "@material-ui/core";
|
||||
import PlayArrowIcon from "@material-ui/icons/PlayArrow";
|
||||
import StopIcon from "@material-ui/icons/Stop";
|
||||
import IpcInvokeButton from "renderer/components/IpcInvokeButton";
|
||||
import { useAppSelector } from "store/hooks";
|
||||
import StopIcon from "@material-ui/icons/Stop";
|
||||
import PlayArrowIcon from "@material-ui/icons/PlayArrow";
|
||||
import InfoBox from "../../modal/swap/InfoBox";
|
||||
import CliLogsBox from "../../other/RenderedCliLog";
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Typography } from "@material-ui/core";
|
||||
import { useIsSwapRunning } from "store/hooks";
|
||||
import HistoryTable from "./table/HistoryTable";
|
||||
import SwapDialog from "../../modal/swap/SwapDialog";
|
||||
import SwapTxLockAlertsBox from "../../alert/SwapTxLockAlertsBox";
|
||||
import SwapDialog from "../../modal/swap/SwapDialog";
|
||||
import HistoryTable from "./table/HistoryTable";
|
||||
|
||||
export default function HistoryPage() {
|
||||
const showDialog = useIsSwapRunning();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Box, makeStyles } from "@material-ui/core";
|
||||
import SwapWidget from "./SwapWidget";
|
||||
import ApiAlertsBox from "./ApiAlertsBox";
|
||||
import SwapWidget from "./SwapWidget";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
outer: {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { Box, Button, makeStyles, Typography } from "@material-ui/core";
|
||||
import { useState } from "react";
|
||||
import SendIcon from "@material-ui/icons/Send";
|
||||
import { useAppSelector, useIsRpcEndpointBusy } from "store/hooks";
|
||||
import { RpcMethod } from "models/rpcModel";
|
||||
import { useState } from "react";
|
||||
import { SatsAmount } from "renderer/components/other/Units";
|
||||
import { useAppSelector, useIsRpcEndpointBusy } from "store/hooks";
|
||||
import BitcoinIcon from "../../icons/BitcoinIcon";
|
||||
import InfoBox from "../../modal/swap/InfoBox";
|
||||
import WithdrawDialog from "../../modal/wallet/WithdrawDialog";
|
||||
import WalletRefreshButton from "./WalletRefreshButton";
|
||||
import InfoBox from "../../modal/swap/InfoBox";
|
||||
import { SatsAmount } from "renderer/components/other/Units";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
title: {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { IconButton, styled } from "@material-ui/core";
|
||||
import { Close } from "@material-ui/icons";
|
||||
import {
|
||||
MaterialDesignContent,
|
||||
SnackbarKey,
|
||||
SnackbarProvider,
|
||||
useSnackbar,
|
||||
} from "notistack";
|
||||
import { IconButton, styled } from "@material-ui/core";
|
||||
import { Close } from "@material-ui/icons";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
const StyledMaterialDesignContent = styled(MaterialDesignContent)(() => ({
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import { render } from "react-dom";
|
||||
import { Provider } from "react-redux";
|
||||
import { store } from "./store/storeRenderer";
|
||||
import { setRegistryProviders } from "store/features/providersSlice";
|
||||
import { setAlerts } from "store/features/alertsSlice";
|
||||
import { setXmrPrice, setBtcPrice } from "store/features/ratesSlice";
|
||||
import { setRegistryProviders } from "store/features/providersSlice";
|
||||
import { setBtcPrice, setXmrPrice } from "store/features/ratesSlice";
|
||||
import logger from "../utils/logger";
|
||||
import {
|
||||
fetchAlertsViaHttp,
|
||||
fetchBtcPrice,
|
||||
fetchProvidersViaHttp,
|
||||
fetchXmrPrice,
|
||||
} from "./api";
|
||||
import logger from "../utils/logger";
|
||||
import App from "./components/App";
|
||||
import { checkBitcoinBalance, getRawSwapInfos } from "./rpc";
|
||||
import { store } from "./store/storeRenderer";
|
||||
|
||||
setTimeout(() => {
|
||||
checkBitcoinBalance();
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import swapReducer from "./features/swapSlice";
|
||||
import providersSlice from "./features/providersSlice";
|
||||
import torSlice from "./features/torSlice";
|
||||
import rpcSlice from "./features/rpcSlice";
|
||||
import alertsSlice from "./features/alertsSlice";
|
||||
import providersSlice from "./features/providersSlice";
|
||||
import ratesSlice from "./features/ratesSlice";
|
||||
import rpcSlice from "./features/rpcSlice";
|
||||
import swapReducer from "./features/swapSlice";
|
||||
import torSlice from "./features/torSlice";
|
||||
|
||||
export const reducers = {
|
||||
swap: swapReducer,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { sortBy } from "lodash";
|
||||
import { TypedUseSelectorHook, useDispatch, useSelector } from "react-redux";
|
||||
import type { AppDispatch, RootState } from "renderer/store/storeRenderer";
|
||||
import { sortBy } from "lodash";
|
||||
import { parseDateString } from "utils/parseUtils";
|
||||
|
||||
// Use throughout your app instead of plain `useDispatch` and `useSelector`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { internalIpV4 } from "internal-ip";
|
||||
import { defineConfig } from "vite";
|
||||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
|
||||
// @ts-expect-error process is a nodejs global
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue