Skip to content

Commit

Permalink
Merge pull request #606 from curvefi/refactor/imports
Browse files Browse the repository at this point in the history
refactor: ambiguous imports
  • Loading branch information
DanielSchiavini authored Jan 17, 2025
2 parents a56b6d9 + be82bca commit 5e46b3f
Show file tree
Hide file tree
Showing 843 changed files with 5,135 additions and 5,271 deletions.
4 changes: 2 additions & 2 deletions apps/dao/src/components/AlertFormError.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { AlertBoxProps } from '@/ui/AlertBox/types'
import type { AlertBoxProps } from '@ui/AlertBox/types'

import { t } from '@lingui/macro'
import React, { useMemo } from 'react'
import styled from 'styled-components'

import AlertBox from '@/ui/AlertBox'
import AlertBox from '@ui/AlertBox'

export enum AlertFormErrorKey {
USER_REJECTED_ACTION = 'error-user-rejected-action',
Expand Down
6 changes: 3 additions & 3 deletions apps/dao/src/components/BackButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import styled from 'styled-components'
import { useNavigate } from 'react-router-dom'

import Box from '@/ui/Box'
import Button from '@/ui/Button'
import Icon from '@/ui/Icon'
import Box from '@ui/Box'
import Button from '@ui/Button'
import Icon from '@ui/Icon'

type BackButtonProps = {
path: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { TooltipProps } from 'recharts'
import styled from 'styled-components'
import { t } from '@lingui/macro'

import { formatNumber } from '@/ui/utils'
import { formatNumber } from '@ui/utils'

import Box from '@/ui/Box'
import Box from '@ui/Box'

const BarChartCustomTooltip = ({ active, payload }: TooltipProps<ValueType, NameType>) => {
if (active && payload && payload.length) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { useEffect } from 'react'
import styled from 'styled-components'
import { t } from '@lingui/macro'

import useStore from '@/store/useStore'
import useStore from '@dao/store/useStore'

import Spinner, { SpinnerWrapper } from '@/ui/Spinner'
import LineChartComponent from '@/components/Charts/LineChartComponent'
import ErrorMessage from '@/components/ErrorMessage'
import Spinner, { SpinnerWrapper } from '@ui/Spinner'
import LineChartComponent from '@dao/components/Charts/LineChartComponent'
import ErrorMessage from '@dao/components/ErrorMessage'

interface GaugeWeightHistoryChartProps {
gaugeAddress: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { TooltipProps } from 'recharts'
import styled from 'styled-components'
import { t } from '@lingui/macro'

import { formatNumber } from '@/ui/utils'
import { formatNumber } from '@ui/utils'

import Box from '@/ui/Box'
import Box from '@ui/Box'

const BarChartCustomTooltip = ({ active, payload }: TooltipProps<ValueType, NameType>) => {
if (active && payload && payload.length) {
Expand Down
4 changes: 2 additions & 2 deletions apps/dao/src/components/Charts/LineChartComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts'

import { formatDateFromTimestamp } from '@/ui/utils/utilsFormat'
import { formatDateFromTimestamp } from '@ui/utils/utilsFormat'

import LineChartCustomTooltip from './LineChartCustomTooltip'
import { GaugeWeightHistoryData } from '@/types/dao.types'
import { GaugeWeightHistoryData } from '@dao/types/dao.types'

type Props = {
data: GaugeWeightHistoryData[]
Expand Down
4 changes: 2 additions & 2 deletions apps/dao/src/components/Charts/LineChartCustomTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { TooltipProps } from 'recharts'
import styled from 'styled-components'
import { t } from '@lingui/macro'

import { formatDateFromTimestamp, formatNumber } from '@/ui/utils/utilsFormat'
import { formatDateFromTimestamp, formatNumber } from '@ui/utils/utilsFormat'

import Box from '@/ui/Box'
import Box from '@ui/Box'

const CustomTooltip = ({ active, payload }: TooltipProps<ValueType, NameType>) => {
if (active && payload && payload.length) {
Expand Down
30 changes: 15 additions & 15 deletions apps/dao/src/components/ComboBoxSelectGauge/ComboBox.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import type { ComboBoxSelectGaugeProps } from '@/components/ComboBoxSelectGauge/types'
import type { ComboBoxSelectGaugeProps } from '@dao/components/ComboBoxSelectGauge/types'

import React, { useEffect, useRef, useState } from 'react'
import { t } from '@lingui/macro'
import chunk from 'lodash/chunk'
import styled from 'styled-components'

import { breakpoints } from '@/ui/utils/responsive'
import useStore from '@/store/useStore'

import { RCEditClear } from '@/ui/images'
import { StyledInput } from '@/ui/InputComp/styles'
import Box from '@/ui/Box/Box'
import ComboBoxListChunk from '@/components/ComboBoxSelectGauge/ComboBoxListChunk'
import Icon from '@/ui/Icon'
import IconButton from '@/ui/IconButton/IconButton'
import InputProvider from '@/ui/InputComp/InputProvider'
import Popover from '@/ui/Popover/Popover'
import Spinner from '@/ui/Spinner'
import SpinnerWrapper from '@/ui/Spinner/SpinnerWrapper'
import { GaugeFormattedData } from '@/types/dao.types'
import { breakpoints } from '@ui/utils/responsive'
import useStore from '@dao/store/useStore'

import { RCEditClear } from '@ui/images'
import { StyledInput } from '@ui/InputComp/styles'
import Box from '@ui/Box/Box'
import ComboBoxListChunk from '@dao/components/ComboBoxSelectGauge/ComboBoxListChunk'
import Icon from '@ui/Icon'
import IconButton from '@ui/IconButton/IconButton'
import InputProvider from '@ui/InputComp/InputProvider'
import Popover from '@ui/Popover/Popover'
import Spinner from '@ui/Spinner'
import SpinnerWrapper from '@ui/Spinner/SpinnerWrapper'
import { GaugeFormattedData } from '@dao/types/dao.types'

const ComboBox = ({
testId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { ComboBoxSelectGaugeProps } from '@/components/ComboBoxSelectGauge/types'
import type { ComboBoxSelectGaugeProps } from '@dao/components/ComboBoxSelectGauge/types'

import React, { useRef } from 'react'
import styled from 'styled-components'

import useIntersectionObserver from 'ui/src/hooks/useIntersectionObserver'

import SelectGaugeListItem from '@/components/ComboBoxSelectGauge/ComboBoxListItem'
import { GaugeFormattedData } from '@/types/dao.types'
import SelectGaugeListItem from '@dao/components/ComboBoxSelectGauge/ComboBoxListItem'
import { GaugeFormattedData } from '@dao/types/dao.types'

const SelectGaugeListChunk = ({
testId,
Expand Down
14 changes: 7 additions & 7 deletions apps/dao/src/components/ComboBoxSelectGauge/ComboBoxListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type { ComboBoxSelectGaugeProps } from '@/components/ComboBoxSelectGauge/types'
import type { ComboBoxSelectGaugeProps } from '@dao/components/ComboBoxSelectGauge/types'

import React from 'react'
import styled from 'styled-components'

import { focusVisible } from '@/ui/utils'
import { shortenTokenAddress } from '@/ui/utils'
import { focusVisible } from '@ui/utils'
import { shortenTokenAddress } from '@ui/utils'

import Box from '@/ui/Box'
import Button from '@/ui/Button'
import Chip from '@/ui/Typography/Chip'
import { GaugeFormattedData } from '@/types/dao.types'
import Box from '@ui/Box'
import Button from '@ui/Button'
import Chip from '@ui/Typography/Chip'
import { GaugeFormattedData } from '@dao/types/dao.types'

const ComboBoxListItem = ({
imageBaseUrl,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { AriaButtonProps } from 'react-aria'
import type { ButtonProps } from '@/ui/Button/types'
import type { ButtonProps } from '@ui/Button/types'

import { useButton } from 'react-aria'
import React, { useRef } from 'react'
import styled from 'styled-components'

import ButtonComp from '@/ui/Button'
import ButtonComp from '@ui/Button'

const ComboBoxSelectedGaugeButton = (props: React.PropsWithChildren<AriaButtonProps<'button'> & ButtonProps>) => {
const ref = useRef<HTMLButtonElement>(null)
Expand Down
16 changes: 8 additions & 8 deletions apps/dao/src/components/ComboBoxSelectGauge/index.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import type { EndsWith } from '@/components/ComboBoxSelectGauge/types'
import type { EndsWith } from '@dao/components/ComboBoxSelectGauge/types'

import Fuse from 'fuse.js'
import React, { useCallback, useState } from 'react'
import { useFilter } from 'react-aria'
import { useOverlayTriggerState } from 'react-stately'
import { t } from '@lingui/macro'

import { delayAction } from '@/utils'
import useStore from '@/store/useStore'
import networks from '@/networks'
import { delayAction } from '@dao/utils'
import useStore from '@dao/store/useStore'
import networks from '@dao/networks'

import ComboBox from '@/components/ComboBoxSelectGauge/ComboBox'
import ComboBoxSelectedGaugeButton from '@/components/ComboBoxSelectGauge/ComboBoxSelectedGaugeButton'
import ModalDialog from '@/ui/Dialog'
import { GaugeFormattedData } from '@/types/dao.types'
import ComboBox from '@dao/components/ComboBoxSelectGauge/ComboBox'
import ComboBoxSelectedGaugeButton from '@dao/components/ComboBoxSelectGauge/ComboBoxSelectedGaugeButton'
import ModalDialog from '@ui/Dialog'
import { GaugeFormattedData } from '@dao/types/dao.types'

const ComboBoxGauges = ({
disabled,
Expand Down
2 changes: 1 addition & 1 deletion apps/dao/src/components/ComboBoxSelectGauge/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GaugeFormattedData } from '@/types/dao.types'
import { GaugeFormattedData } from '@dao/types/dao.types'

export type EndsWith = (string: string, substring: string) => boolean

Expand Down
6 changes: 3 additions & 3 deletions apps/dao/src/components/ConnectWallet.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { isLoading } from '@/ui/utils'
import useStore from '@/store/useStore'
import { isLoading } from '@ui/utils'
import useStore from '@dao/store/useStore'
import { useUserProfileStore } from '@ui-kit/features/user-profile'

import ConnectWalletPrompt from '@/ui/ConnectWalletPrompt'
import ConnectWalletPrompt from '@ui/ConnectWalletPrompt'

type ConnectWalletProps = {
description: string
Expand Down
6 changes: 3 additions & 3 deletions apps/dao/src/components/CopyIconButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { copyToClipboard } from '@/utils'
import { copyToClipboard } from '@dao/utils'

import TooltipButton from '@/ui/Tooltip'
import Icon from '@/ui/Icon'
import TooltipButton from '@ui/Tooltip'
import Icon from '@ui/Icon'

type CopyIconButtonProps = {
copyContent: string
Expand Down
14 changes: 7 additions & 7 deletions apps/dao/src/components/DetailInfoEstGas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import isNaN from 'lodash/isNaN'
import isUndefined from 'lodash/isUndefined'
import styled from 'styled-components'

import { NETWORK_TOKEN } from '@/constants'
import { FORMAT_OPTIONS, formatNumber } from '@/ui/utils'
import { NETWORK_TOKEN } from '@dao/constants'
import { FORMAT_OPTIONS, formatNumber } from '@ui/utils'
import { gweiToEther, weiToGwei } from '@ui-kit/utils'
import networks from '@/networks'
import useStore from '@/store/useStore'
import networks from '@dao/networks'
import useStore from '@dao/store/useStore'

import DetailInfo from '@/ui/DetailInfo'
import IconTooltip from '@/ui/Tooltip/TooltipIcon'
import { CurveApi, ChainId, EstimatedGas } from '@/types/dao.types'
import DetailInfo from '@ui/DetailInfo'
import IconTooltip from '@ui/Tooltip/TooltipIcon'
import { CurveApi, ChainId, EstimatedGas } from '@dao/types/dao.types'

export type StepProgress = {
active: number
Expand Down
4 changes: 2 additions & 2 deletions apps/dao/src/components/ErrorMessage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from 'styled-components'

import IconButton from '@/ui/IconButton'
import Icon from '@/ui/Icon'
import IconButton from '@ui/IconButton'
import Icon from '@ui/Icon'

type Props = {
message: string
Expand Down
4 changes: 2 additions & 2 deletions apps/dao/src/components/ExternalLinkButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components'
import Icon from '@/ui/Icon'
import Button from '@/ui/Button'
import Icon from '@ui/Icon'
import Button from '@ui/Button'

type ExternalLinkIconButtonProps = {
href: string
Expand Down
6 changes: 3 additions & 3 deletions apps/dao/src/components/ExternalLinkIconButton.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import styled from 'styled-components'

import TooltipButton from '@/ui/Tooltip'
import { ExternalLink } from '@/ui/Link'
import Icon from '@/ui/Icon'
import TooltipButton from '@ui/Tooltip'
import { ExternalLink } from '@ui/Link'
import Icon from '@ui/Icon'

type ExternalLinkIconButtonProps = {
href: string
Expand Down
6 changes: 3 additions & 3 deletions apps/dao/src/components/InternalLinkButton.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import styled from 'styled-components'
import { useNavigate, useParams } from 'react-router-dom'

import { getPath } from '@/utils/utilsRouter'
import { getPath } from '@dao/utils/utilsRouter'

import { InternalLink } from '@/ui/Link'
import Icon from '@/ui/Icon'
import { InternalLink } from '@ui/Link'
import Icon from '@ui/Icon'

type InternalLinkButtonProps = {
to: string
Expand Down
4 changes: 2 additions & 2 deletions apps/dao/src/components/Page404/Page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { NextPage } from 'next'

import DocumentHead from '@/layout/DocumentHead'
import Error404 from '@/ui/Error404'
import DocumentHead from '@dao/layout/DocumentHead'
import Error404 from '@ui/Error404'

const Page: NextPage = () => (
<>
Expand Down
10 changes: 5 additions & 5 deletions apps/dao/src/components/PageAnalytics/CrvStats/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useEffect } from 'react'
import styled from 'styled-components'

import useStore from '@/store/useStore'
import { formatNumber } from '@/ui/utils'
import useStore from '@dao/store/useStore'
import { formatNumber } from '@ui/utils'
import { t } from '@lingui/macro'

import Box from '@/ui/Box'
import MetricsComp, { MetricsColumnData } from '@/components/MetricsComp'
import Tooltip from '@/ui/Tooltip'
import Box from '@ui/Box'
import MetricsComp, { MetricsColumnData } from '@dao/components/MetricsComp'
import Tooltip from '@ui/Tooltip'

const CrvStats: React.FC = () => {
const provider = useStore((state) => state.wallet.getProvider(''))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BarChart, Bar, Cell, XAxis, YAxis, CartesianGrid, Tooltip, ReferenceLin
import { formatNumber } from 'ui/src/utils'

import PositiveAndNegativeBarChartTooltip from './PositiveAndNegativeBarChartTooltip'
import { VeCrvDailyLock } from '@/types/dao.types'
import { VeCrvDailyLock } from '@dao/types/dao.types'

type PositiveAndNegativeBarChartProps = {
data: VeCrvDailyLock[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { TooltipProps } from 'recharts'
import styled from 'styled-components'
import { t } from '@lingui/macro'

import { formatNumber } from '@/ui/utils/utilsFormat'
import { formatNumber } from '@ui/utils/utilsFormat'

import Box from '@/ui/Box'
import Box from '@ui/Box'

const PositiveAndNegativeBarChartTooltip: React.FC<TooltipProps<ValueType, NameType>> = ({ active, payload }) => {
if (active && payload && payload.length) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import styled from 'styled-components'
import { useEffect } from 'react'
import { t } from '@lingui/macro'

import useStore from '@/store/useStore'
import useStore from '@dao/store/useStore'

import Box from '@/ui/Box'
import Box from '@ui/Box'
import Spinner from '../../Spinner'
import ErrorMessage from '@/components/ErrorMessage'
import ErrorMessage from '@dao/components/ErrorMessage'
import PositiveAndNegativeBarChart from './PositiveAndNegativeBarChart'

const DailyLocks: React.FC = () => {
Expand Down
14 changes: 7 additions & 7 deletions apps/dao/src/components/PageAnalytics/HoldersTable/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import styled from 'styled-components'
import { t } from '@lingui/macro'

import useStore from '@/store/useStore'
import useStore from '@dao/store/useStore'

import { shortenTokenAddress, formatNumber, formatDateFromTimestamp, convertToLocaleTimestamp } from '@/ui/utils'
import { TOP_HOLDERS } from '@/constants'
import { shortenTokenAddress, formatNumber, formatDateFromTimestamp, convertToLocaleTimestamp } from '@ui/utils'
import { TOP_HOLDERS } from '@dao/constants'

import PaginatedTable, { Column } from '@/components/PaginatedTable'
import { TableRowWrapper, TableData, TableDataLink } from '@/components/PaginatedTable/TableRow'
import Box from '@/ui/Box'
import { VeCrvHolder, AllHoldersSortBy } from '@/types/dao.types'
import PaginatedTable, { Column } from '@dao/components/PaginatedTable'
import { TableRowWrapper, TableData, TableDataLink } from '@dao/components/PaginatedTable/TableRow'
import Box from '@ui/Box'
import { VeCrvHolder, AllHoldersSortBy } from '@dao/types/dao.types'

const TopHoldersTable: React.FC = () => {
const { veCrvHolders, allHoldersSortBy, setAllHoldersSortBy, getVeCrvHolders } = useStore((state) => state.analytics)
Expand Down
Loading

0 comments on commit 5e46b3f

Please sign in to comment.