Skip to content

Commit 24aa291

Browse files
committed
refactor: rearrange common components
1 parent 9b7db28 commit 24aa291

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+118
-103
lines changed

src/App.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@ import {
88
Route,
99
Switch,
1010
} from "react-router-dom";
11-
import ConnectionFailed from "./common/ConnectionFailed";
12-
import NotFound from "./common/NotFound";
11+
import ConnectionFailed from "./common/components/ConnectionFailed";
12+
import NotFound from "./common/components/NotFound";
1313
import Dashboard from "./dashboard/Dashboard";
1414
import { Path } from "./router/Path";
1515
import { darkTheme } from "./themes";
1616
import { useElectronStore } from "./stores/electronStore";
1717
import { Provider } from "mobx-react";
18-
import { isElectron, logError, sendMessageToParent } from "./common/appUtil";
18+
import {
19+
isElectron,
20+
logError,
21+
sendMessageToParent,
22+
} from "./common/utils/appUtil";
1923
import { useBackupStore } from "./stores/backupStore";
2024
import api from "./api";
21-
import { getErrorMsg } from "./common/errorUtil";
25+
import { getErrorMsg } from "./common/utils/errorUtil";
2226
import { timer } from "rxjs";
2327
import { exhaustMap, retry } from "rxjs/operators";
2428

src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { from, fromEvent, Observable, of, throwError } from "rxjs";
22
import { catchError, mergeMap } from "rxjs/operators";
33
import io from "socket.io-client";
4-
import { logError } from "./common/appUtil";
4+
import { logError } from "./common/utils/appUtil";
55
import { BackupInfo } from "./models/BackupInfo";
66
import { CreateReverseSwapRequest } from "./models/CreateReverseSwapRequest";
77
import { CreateReverseSwapResponse } from "./models/CreateReverseSwapResponse";

src/common/ConnectionFailed.tsx renamed to src/common/components/ConnectionFailed.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
} from "@material-ui/core";
99
import React, { ReactElement, useEffect } from "react";
1010
import { useHistory } from "react-router-dom";
11-
import { Path } from "../router/Path";
12-
import { isElectron, sendMessageToParent } from "./appUtil";
11+
import { Path } from "../../router/Path";
12+
import { isElectron, sendMessageToParent } from "../utils/appUtil";
1313

1414
const useStyles = makeStyles((theme: Theme) =>
1515
createStyles({

src/common/NotFound.tsx renamed to src/common/components/NotFound.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createStyles, Grid, makeStyles, Theme } from "@material-ui/core";
22
import React, { ReactElement } from "react";
3-
import notFoundImg from "../assets/404.png";
3+
import notFoundImg from "../../assets/404.png";
44

55
const useStyles = makeStyles((theme: Theme) =>
66
createStyles({
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)