Skip to content

Commit

Permalink
style: order imports
Browse files Browse the repository at this point in the history
Signed-off-by: rare-magma <[email protected]>
  • Loading branch information
rare-magma committed Oct 2, 2024
1 parent b924f4b commit ca0df7e
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/guitos/context/ConfigContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
useContext,
useState,
} from "react";
import { localForageOptionsRepository } from "../infrastructure/localForageOptionsRepository";
import { UserOptions } from "../domain/userOptions";
import type { IntlConfig } from "react-currency-input-field/dist/components/CurrencyInputProps";
import { UserOptions } from "../domain/userOptions";
import { localForageOptionsRepository } from "../infrastructure/localForageOptionsRepository";

interface ConfigContextInterface {
userOptions: UserOptions;
Expand Down
2 changes: 1 addition & 1 deletion src/guitos/hooks/useDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import { useGeneralContext } from "../context/GeneralContext";
import { Budget } from "../domain/budget";
import type { BudgetItem } from "../domain/budgetItem";
import type { CalculationHistoryItem } from "../domain/calculationHistoryItem";
import { UserOptions } from "../domain/userOptions";
import { Uuid } from "../domain/uuid";
import { localForageBudgetRepository } from "../infrastructure/localForageBudgetRepository";
import { localForageCalcHistRepository } from "../infrastructure/localForageCalcHistRepository";
import { localForageOptionsRepository } from "../infrastructure/localForageOptionsRepository";
import type { Filter, FilteredItem } from "../sections/ChartsPage/ChartsPage";
import type { SearchOption } from "../sections/NavBar/NavBar";
import { UserOptions } from "../domain/userOptions";

const budgetRepository = new localForageBudgetRepository();
const optionsRepository = new localForageOptionsRepository();
Expand Down
2 changes: 1 addition & 1 deletion src/guitos/infrastructure/localForageOptionsRepository.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import localforage from "localforage";
import { currenciesMap } from "../../lists/currenciesMap";
import { CURRENCY_CODE, LOCALE } from "../domain/userOptions";
import type { UserOptionsRepository } from "../domain/userOptionsRepository";
import type { UserOptions } from "../domain/userOptions";
import type { UserOptionsRepository } from "../domain/userOptionsRepository";

export class localForageOptionsRepository implements UserOptionsRepository {
private readonly optionsDB;
Expand Down
2 changes: 1 addition & 1 deletion src/guitos/sections/Budget/BudgetPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { useParams } from "react-router-dom";
import { createBudgetNameList } from "../../../utils";
import { useBudget } from "../../context/BudgetContext";
import {
useGeneralContext,
type BudgetNotification,
useGeneralContext,
} from "../../context/GeneralContext";
import type { Budget } from "../../domain/budget";
import { useDB } from "../../hooks/useDB";
Expand Down
6 changes: 3 additions & 3 deletions src/guitos/sections/ErrorModal/ErrorModal.test.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { describe, expect, it, vi } from "vitest";
import { ErrorModal } from "./ErrorModal";
import { CsvErrorMother } from "../../domain/csvError.mother";
import type { CsvError } from "../../domain/csvError";
import { JsonErrorMother } from "../../domain/jsonError.mother";
import { CsvErrorMother } from "../../domain/csvError.mother";
import type { JsonError } from "../../domain/jsonError";
import { JsonErrorMother } from "../../domain/jsonError.mother";
import { ErrorModal } from "./ErrorModal";

const error = "Thrown error";
const jsonErrors: JsonError[] = [JsonErrorMother.error()];
Expand Down
2 changes: 1 addition & 1 deletion src/guitos/sections/ItemForm/ItemFormGroup.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { describe, expect, it } from "vitest";
import { setBudgetMock } from "../../../setupTests";
import { BudgetMother } from "../../domain/budget.mother";
import { BudgetItemsMother } from "../../domain/budgetItem.mother";
import { ItemFormGroup } from "./ItemFormGroup";
import { UserOptionsMother } from "../../domain/userOptions.mother";
import { ItemFormGroup } from "./ItemFormGroup";

describe("ItemFormGroup", () => {
const ref = createRef<HTMLInputElement>();
Expand Down
2 changes: 1 addition & 1 deletion src/guitos/sections/NavBar/NavBarSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { useHotkeys } from "react-hotkeys-hook";
import { BsGear } from "react-icons/bs";
import { currenciesList } from "../../../lists/currenciesList";
import { useConfig } from "../../context/ConfigContext";
import { useDB } from "../../hooks/useDB";
import { UserOptions } from "../../domain/userOptions";
import { useDB } from "../../hooks/useDB";

interface NavBarSettingsProps {
expanded: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/guitos/sections/Notification/Notification.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { describe, expect, it, vi } from "vitest";
import { undoMock } from "../../../setupTests";
import { Notification } from "./Notification";
import type { BudgetNotification } from "../../context/GeneralContext";
import { Notification } from "./Notification";

describe("Notification", () => {
const notification: BudgetNotification = {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { expect, test } from "vitest";
import type { Budget } from "./guitos/domain/budget";
import { BudgetMother } from "./guitos/domain/budget.mother";
import type { ItemOperation } from "./guitos/domain/calculationHistoryItem";
import { UserOptions } from "./guitos/domain/userOptions";
import { Uuid } from "./guitos/domain/uuid";
import { localForageOptionsRepository } from "./guitos/infrastructure/localForageOptionsRepository";
import type { FilteredItem } from "./guitos/sections/ChartsPage/ChartsPage";
Expand All @@ -21,7 +22,6 @@ import {
parseLocaleNumber,
roundBig,
} from "./utils";
import { UserOptions } from "./guitos/domain/userOptions";

const optionsRepository = new localForageOptionsRepository();

Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import type { MutableRefObject } from "react";
import type { NavigateFunction } from "react-router-dom";
import type { Budget } from "./guitos/domain/budget";
import type { ItemOperation } from "./guitos/domain/calculationHistoryItem";
import type { UserOptions } from "./guitos/domain/userOptions";
import type { FilteredItem } from "./guitos/sections/ChartsPage/ChartsPage";
import type { SearchOption } from "./guitos/sections/NavBar/NavBar";
import type { UserOptions } from "./guitos/domain/userOptions";

export function roundBig(number: Big, precision: number): number {
return Big(number).round(precision, 1).toNumber();
Expand Down

0 comments on commit ca0df7e

Please sign in to comment.