Skip to content

Commit

Permalink
Update the directory structure in the dApp (#915)
Browse files Browse the repository at this point in the history
Closes AENG-158

This PR fixes the directory structure for dApp a bit. Let's make further
possible tweaks in the next PRs. What has been done:

- Reduced the directory structure and pull the existing components one
level up.
- Used the same names on the file and the component inside. We should
not decouple file name from component name—these should match.
  • Loading branch information
nkuba authored Dec 6, 2024
2 parents 8fb2ad7 + 86dc681 commit bf41dbb
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 9 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react"
import { List } from "@chakra-ui/react"
import TransactionDetailsAmountItem from "#/components/shared/TransactionDetails/AmountItem"
import FeesDetailsAmountItem from "#/components/shared/FeesDetails/FeesItem"
import TransactionDetailsAmountItem from "#/components/shared/TransactionDetails/TransactionDetailsAmountItem"
import FeesDetailsAmountItem from "#/components/shared/FeesDetails/FeesDetailsAmountItem"
import { TOKEN_AMOUNT_FIELD_NAME } from "#/components/shared/TokenAmountForm/TokenAmountFormBase"
import { FeesTooltip } from "#/components/TransactionModal/FeesTooltip"
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from "react"
import { List } from "@chakra-ui/react"
import TransactionDetailsAmountItem from "#/components/shared/TransactionDetails/AmountItem"
import { TOKEN_AMOUNT_FIELD_NAME } from "#/components/shared/TokenAmountForm/TokenAmountFormBase"
import {
useFormField,
Expand All @@ -9,7 +8,8 @@ import {
} from "#/hooks"
import { ACTION_FLOW_TYPES, CurrencyType } from "#/types"
import { DESIRED_DECIMALS_FOR_FEE } from "#/constants"
import FeesDetailsAmountItem from "#/components/shared/FeesDetails/FeesItem"
import FeesDetailsAmountItem from "#/components/shared/FeesDetails/FeesDetailsAmountItem"
import TransactionDetailsAmountItem from "#/components/shared/TransactionDetails/TransactionDetailsAmountItem"
import { FeesTooltip } from "../../FeesTooltip"

function UnstakeDetails({ currency }: { currency: CurrencyType }) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
numberToLocaleString,
} from "#/utils"
import { CurrencyType, AmountType } from "#/types"
import Tooltip from "../Tooltip"
import Tooltip from "./Tooltip"

export type CurrencyBalanceProps = {
currency: CurrencyType
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import { useCurrencyConversion } from "#/hooks"
import { CurrencyBalance, CurrencyBalanceProps } from "../CurrencyBalance"
import { CurrencyBalance, CurrencyBalanceProps } from "./CurrencyBalance"

export function CurrencyBalanceWithConversion({
from,
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import { useCurrencyConversion } from "#/hooks"
import NumberFormatInput, {
NumberFormatInputValues,
NumberFormatInputProps,
} from "../NumberFormatInput"
import { CurrencyBalance } from "../CurrencyBalance"
import HelperErrorText, { HelperErrorTextProps } from "../Form/HelperErrorText"
} from "./NumberFormatInput"
import { CurrencyBalance } from "./CurrencyBalance"
import HelperErrorText, { HelperErrorTextProps } from "./Form/HelperErrorText"

type FiatCurrencyBalanceProps = {
amount: bigint
Expand Down

0 comments on commit bf41dbb

Please sign in to comment.