Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove shared directory #934

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dapp/src/components/AcrePointsClaimModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { time } from "#/constants"
import ConfettiExplosion from "react-confetti-explosion"
import { BaseModalProps } from "#/types"
import withBaseModal from "./ModalRoot/withBaseModal"
import AnimatedNumber from "./shared/AnimatedNumber"
import AnimatedNumber from "./AnimatedNumber"

const MotionBox = motion(Box)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dapp/src/components/ArrivingSoonTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ReactNode } from "react"
import Tooltip from "./shared/Tooltip"
import Tooltip from "./Tooltip"

export default function ArrivingSoonTooltip({
label,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
AlertTitle,
AlertIcon,
AlertProps,
} from "../shared/Alert"
} from "../Alert"

export enum ConnectionAlert {
Rejected = "REJECTED",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { IconArrowNarrowRight } from "@tabler/icons-react"
import { AnimatePresence, Variants, motion } from "framer-motion"
import ArrivingSoonTooltip from "../ArrivingSoonTooltip"
import ConnectWalletStatusLabel from "./ConnectWalletStatusLabel"
import Spinner from "../shared/Spinner"
import Spinner from "../Spinner"
import { ConnectionAlert } from "./ConnectWalletAlert"

type ConnectWalletButtonProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
IconCircleX,
IconInfoCircle,
} from "@tabler/icons-react"
import Spinner from "../shared/Spinner"
import Spinner from "../Spinner"

const statusToLabelProps: Record<Status, { color: string }> = {
idle: {
Expand Down
4 changes: 2 additions & 2 deletions dapp/src/components/GateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { externalHref } from "#/constants"
import { BaseModalProps } from "#/types"
import { useAccessCode } from "#/hooks"
import withBaseModal from "./ModalRoot/withBaseModal"
import PasswordForm from "./shared/PasswordForm"
import { PasswordFormValues } from "./shared/PasswordForm/PasswordFormBase"
import PasswordForm from "./PasswordForm"
import { PasswordFormValues } from "./PasswordForm/PasswordFormBase"

export function GateModalBase({ closeModal }: BaseModalProps) {
const { saveAccessCode } = useAccessCode()
Expand Down
4 changes: 2 additions & 2 deletions dapp/src/components/Header/ConnectWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
usePostHogIdentity,
useWallet,
} from "#/hooks"
import CurrencyBalance from "#/components/shared/CurrencyBalance"
import { BitcoinIcon } from "#/assets/icons"
import { referralProgram, addressUtils } from "#/utils"
import { motion } from "framer-motion"
Expand All @@ -35,7 +34,8 @@ import {
IconChevronUp,
} from "@tabler/icons-react"
import { useMatch } from "react-router-dom"
import Tooltip from "../shared/Tooltip"
import Tooltip from "../Tooltip"
import CurrencyBalance from "../CurrencyBalance"

function isChangeAccountFeatureSupported(embeddedApp: string | undefined) {
return referralProgram.isEmbedApp(embeddedApp)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dapp/src/components/MobileModeBanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { IconChevronDown } from "@tabler/icons-react"
import { AnimatePresence, motion } from "framer-motion"
import { externalHref } from "#/constants"
import AcreAnimatedBadge from "./AcreAnimatedBadge"
import LiveTag from "../shared/LiveTag"
import LiveTag from "../LiveTag"

const MotionIcon = motion(Icon)
const MotionBox = motion(Box)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ActivityType } from "#/types"
import { activitiesUtils } from "#/utils"
import { useFormField } from "#/hooks"
import { Text } from "@chakra-ui/react"
import { TOKEN_AMOUNT_FIELD_NAME } from "../shared/TokenAmountForm/TokenAmountFormBase"
import { TOKEN_AMOUNT_FIELD_NAME } from "../TokenAmountForm/TokenAmountFormBase"

export default function ActionDurationEstimation({
type,
Expand Down
2 changes: 1 addition & 1 deletion dapp/src/components/TransactionModal/ActionFormModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
BaseFormProps,
PROCESS_STATUSES,
} from "#/types"
import { TokenAmountFormValues } from "#/components/shared/TokenAmountForm/TokenAmountFormBase"
import { TokenAmountFormValues } from "#/components/TokenAmountForm/TokenAmountFormBase"
import { logPromiseFailure } from "#/utils"
import { setStatus, setTokenAmount } from "#/store/action-flow"
import StakeFormModal from "./ActiveStakingStep/StakeFormModal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from "@chakra-ui/react"
import { numbersUtils } from "#/utils"
import { IconChevronDown } from "@tabler/icons-react"
import { TOKEN_AMOUNT_FIELD_NAME } from "#/components/shared/TokenAmountForm/TokenAmountFormBase"
import { TOKEN_AMOUNT_FIELD_NAME } from "#/components/TokenAmountForm/TokenAmountFormBase"
import {
useFormField,
useMinDepositAmount,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react"
import { List } from "@chakra-ui/react"
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 FeesDetailsAmountItem from "#/components/FeesDetails/FeesDetailsAmountItem"
import TransactionDetailsAmountItem from "#/components/TransactionDetails/TransactionDetailsAmountItem"
import { TOKEN_AMOUNT_FIELD_NAME } from "#/components/TokenAmountForm/TokenAmountFormBase"
import {
useFormField,
useMinDepositAmount,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from "react"
import TokenAmountForm from "#/components/shared/TokenAmountForm"
import { TokenAmountFormValues } from "#/components/shared/TokenAmountForm/TokenAmountFormBase"
import TokenAmountForm from "#/components/TokenAmountForm"
import { TokenAmountFormValues } from "#/components/TokenAmountForm/TokenAmountFormBase"
import { useMinDepositAmount, useWallet } from "#/hooks"
import { FormSubmitButton } from "#/components/shared/Form"
import { ACTION_FLOW_TYPES, BaseFormProps } from "#/types"
import { numbersUtils, currencyUtils } from "#/utils"
import { featureFlags } from "#/constants"
import { FormSubmitButton } from "#/components/Form"
import StakeDetails from "./StakeDetails"
import AcrePointsRewardEstimation from "./AcrePointsRewardEstimation"
import ActionDurationEstimation from "../../ActionDurationEstimation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import {
Text,
} from "@chakra-ui/react"
import { CableWithPlugIcon } from "#/assets/icons"
import IconWrapper from "#/components/shared/IconWrapper"
import IconWrapper from "#/components/IconWrapper"
import { timeUtils, numbersUtils } from "#/utils"
import { useCountdown } from "#/hooks"
import { time } from "#/constants"
import { IconShieldCheckFilled, IconX } from "@tabler/icons-react"
import Skeleton from "#/components/shared/Skeleton"
import Skeleton from "#/components/Skeleton"

const getCounterData = (minutes: string, seconds: string) => {
const isLessThanMinute = parseInt(minutes, 10) <= 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import {
} from "@chakra-ui/react"
import { CableWithPlugIcon } from "#/assets/icons"
import { externalHref } from "#/constants"
import IconWrapper from "#/components/shared/IconWrapper"
import IconWrapper from "#/components/IconWrapper"
import {
IconBrandDiscordFilled,
IconReload,
IconServerBolt,
} from "@tabler/icons-react"
// import TooltipIcon from "#/components/shared/TooltipIcon"
// import TooltipIcon from "#/components/TooltipIcon"

export default function ServerErrorModal({
isLoading,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ModalHeader,
Text,
} from "@chakra-ui/react"
import Spinner from "#/components/shared/Spinner"
import Spinner from "#/components/Spinner"

export default function BuildTransactionModal({
onClose,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
import { setStatus } from "#/store/action-flow"
import { PROCESS_STATUSES } from "#/types"
import { BitcoinsStackErrorIcon } from "#/assets/icons"
import { Alert, AlertIcon } from "../../shared/Alert"
import CurrencyBalance from "../../shared/CurrencyBalance"
import CurrencyBalance from "#/components/CurrencyBalance"
import { Alert, AlertIcon } from "#/components/Alert"

export default function NotEnoughFundsModal() {
const dispatch = useAppDispatch()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from "react"
import { List } from "@chakra-ui/react"
import { TOKEN_AMOUNT_FIELD_NAME } from "#/components/shared/TokenAmountForm/TokenAmountFormBase"
import { TOKEN_AMOUNT_FIELD_NAME } from "#/components/TokenAmountForm/TokenAmountFormBase"
import {
useFormField,
useMinWithdrawAmount,
useTransactionDetails,
} from "#/hooks"
import { ACTION_FLOW_TYPES, CurrencyType } from "#/types"
import { currencies } from "#/constants"
import FeesDetailsAmountItem from "#/components/shared/FeesDetails/FeesDetailsAmountItem"
import TransactionDetailsAmountItem from "#/components/shared/TransactionDetails/TransactionDetailsAmountItem"
import FeesDetailsAmountItem from "#/components/FeesDetails/FeesDetailsAmountItem"
import TransactionDetailsAmountItem from "#/components/TransactionDetails/TransactionDetailsAmountItem"
import FeesTooltip from "../../FeesTooltip"

function UnstakeDetails({ currency }: { currency: CurrencyType }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react"
import TokenAmountForm from "#/components/shared/TokenAmountForm"
import { TokenAmountFormValues } from "#/components/shared/TokenAmountForm/TokenAmountFormBase"
import { FormSubmitButton } from "#/components/shared/Form"
import TokenAmountForm from "#/components/TokenAmountForm"
import { TokenAmountFormValues } from "#/components/TokenAmountForm/TokenAmountFormBase"
import { FormSubmitButton } from "#/components/Form"
import { ACTION_FLOW_TYPES, BaseFormProps, PROCESS_STATUSES } from "#/types"
import {
useActionFlowStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react"
import { ListItem, Text } from "@chakra-ui/react"
import CurrencyBalance, {
CurrencyBalanceProps,
} from "#/components/shared/CurrencyBalance"
} from "#/components/CurrencyBalance"
import { currencies } from "#/constants"

type FeesItemType = CurrencyBalanceProps & {
Expand Down
2 changes: 1 addition & 1 deletion dapp/src/components/TransactionModal/FeesTooltip/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import { List } from "@chakra-ui/react"
import TooltipIcon from "#/components/shared/TooltipIcon"
import TooltipIcon from "#/components/TooltipIcon"
import { Fee as AcreFee } from "#/types"
import FeesTooltipItem from "./FeesTooltipItem"

Expand Down
3 changes: 1 addition & 2 deletions dapp/src/components/TransactionModal/ResumeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import {
HStack,
Text,
} from "@chakra-ui/react"

import Spinner from "#/components/shared/Spinner"
import { PauseIcon } from "#/assets/icons"
import { useActionFlowPause, useActionFlowType } from "#/hooks"
import { ACTION_FLOW_TYPES, BaseModalProps } from "#/types"
import Spinner from "../Spinner"

export default function ResumeModal({ closeModal }: BaseModalProps) {
const { handleResume } = useActionFlowPause()
Expand Down
6 changes: 3 additions & 3 deletions dapp/src/components/TransactionModal/SuccessModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import {
} from "@chakra-ui/react"
import { LoadingSpinnerSuccessIcon } from "#/assets/icons"
import { useActionFlowTokenAmount, useActionFlowTxHash } from "#/hooks"
import CurrencyBalanceWithConversion from "#/components/shared/CurrencyBalanceWithConversion"
import { ACTION_FLOW_TYPES, ActionFlowType } from "#/types"
import { IconArrowUpRight } from "@tabler/icons-react"
import { activitiesUtils } from "#/utils"
import { Alert, AlertIcon, AlertDescription } from "#/components/shared/Alert"
import BlockExplorerLink from "../shared/BlockExplorerLink"
import CurrencyBalanceWithConversion from "../CurrencyBalanceWithConversion"
import BlockExplorerLink from "../BlockExplorerLink"
import { Alert, AlertIcon, AlertDescription } from "../Alert"

type SuccessModalProps = {
type: ActionFlowType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { AcreSignIcon } from "#/assets/icons"
import { useActionFlowType, useConnector, useIsEmbed } from "#/hooks"
import { ACTION_FLOW_TYPES, DappMode } from "#/types"
import { Alert, AlertIcon } from "../shared/Alert"
import { Alert, AlertIcon } from "../Alert"

const ICON_STYLES = {
boxSize: 14,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import { HStack, Text } from "@chakra-ui/react"
import Countdown from "#/components/shared/Countdown"
import Countdown from "#/components/Countdown"
import { logPromiseFailure } from "#/utils"
import { useAcrePointsData, useUserPointsData } from "#/hooks"
import LabelWrapper from "./LabelWrapper"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from "react"
import { Button, HStack, VStack, Text } from "@chakra-ui/react"
import { numbersUtils } from "#/utils"
import { useAcrePointsData, useClaimPoints, useUserPointsData } from "#/hooks"
import Spinner from "#/components/shared/Spinner"
import TooltipIcon from "#/components/shared/TooltipIcon"
import Spinner from "#/components/Spinner"
import TooltipIcon from "#/components/TooltipIcon"
import useDebounce from "#/hooks/useDebounce"
import { time } from "#/constants"
import LabelWrapper from "./LabelWrapper"
Expand Down
4 changes: 2 additions & 2 deletions dapp/src/pages/DashboardPage/AcrePointsCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
} from "@chakra-ui/react"
import { numbersUtils } from "#/utils"
import { useAcrePointsData, useUserPointsData, useWallet } from "#/hooks"
import UserDataSkeleton from "#/components/shared/UserDataSkeleton"
import TooltipIcon from "#/components/shared/TooltipIcon"
import UserDataSkeleton from "#/components/UserDataSkeleton"
import TooltipIcon from "#/components/TooltipIcon"
import acrePointsIllustrationSrc from "#/assets/images/acre-points-illustration.png"
import AcrePointsLabel from "./AcrePointsLabel"
import UserPointsLabel from "./UserPointsLabel"
Expand Down
2 changes: 1 addition & 1 deletion dapp/src/pages/DashboardPage/AcrePointsTemplateCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Text,
} from "@chakra-ui/react"
import { acrePointsCardPlaceholder } from "#/assets/images"
import UserDataSkeleton from "#/components/shared/UserDataSkeleton"
import UserDataSkeleton from "#/components/UserDataSkeleton"
import {
IconArrowUpRight,
IconPlayerTrackNextFilled,
Expand Down
2 changes: 1 addition & 1 deletion dapp/src/pages/DashboardPage/AcreTVLMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react"
import { Box, HStack, StackProps, VStack, Text } from "@chakra-ui/react"
import { useActivitiesCount, useStatistics, useWallet } from "#/hooks"
import { IconBolt } from "@tabler/icons-react"
import CurrencyBalance from "#/components/shared/CurrencyBalance"
import CurrencyBalance from "#/components/CurrencyBalance"

type AcreTVLMessageProps = Omit<StackProps, "children">

Expand Down
4 changes: 2 additions & 2 deletions dapp/src/pages/DashboardPage/AcreTVLProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
} from "@chakra-ui/react"
import { useStatistics } from "#/hooks"
import { BitcoinIcon } from "#/assets/icons"
import CurrencyBalance from "#/components/shared/CurrencyBalance"
import ProgressBar from "#/components/shared/ProgressBar"
import CurrencyBalance from "#/components/CurrencyBalance"
import ProgressBar from "#/components/ProgressBar"

type AcreTVLProgressProps = StackProps

Expand Down
4 changes: 2 additions & 2 deletions dapp/src/pages/DashboardPage/BeehiveCard.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react"
import { MezoSignIcon } from "#/assets/icons"
import { beehiveIllustration } from "#/assets/images"
import TooltipIcon from "#/components/shared/TooltipIcon"
import UserDataSkeleton from "#/components/shared/UserDataSkeleton"
import TooltipIcon from "#/components/TooltipIcon"
import UserDataSkeleton from "#/components/UserDataSkeleton"
import { useMats, useModal } from "#/hooks"
import { MODAL_TYPES } from "#/types"
import { numbersUtils } from "#/utils"
Expand Down
6 changes: 3 additions & 3 deletions dapp/src/pages/DashboardPage/PositionDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react"
import CurrencyBalanceWithConversion from "#/components/shared/CurrencyBalanceWithConversion"
import CurrencyBalanceWithConversion from "#/components/CurrencyBalanceWithConversion"
import {
useActivitiesCount,
useBitcoinPosition,
Expand All @@ -19,10 +19,10 @@ import {
Text,
} from "@chakra-ui/react"
import ArrivingSoonTooltip from "#/components/ArrivingSoonTooltip"
import UserDataSkeleton from "#/components/shared/UserDataSkeleton"
import UserDataSkeleton from "#/components/UserDataSkeleton"
import { featureFlags } from "#/constants"
import { IconClockHour5Filled } from "@tabler/icons-react"
import TooltipIcon from "#/components/shared/TooltipIcon"
import TooltipIcon from "#/components/TooltipIcon"
import { activitiesUtils } from "#/utils"
import AcreTVLMessage from "./AcreTVLMessage"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import { Box, Tag, TagLabel, Flex, TagLeftIcon } from "@chakra-ui/react"
import Spinner from "#/components/shared/Spinner"
import Spinner from "#/components/Spinner"
import { activitiesUtils } from "#/utils"
import { Activity } from "#/types"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
PaginationFooter,
PaginationPage,
PaginationStatus,
} from "#/components/shared/Pagination"
import CurrencyBalance from "#/components/shared/CurrencyBalance"
} from "#/components/Pagination"
import CurrencyBalance from "#/components/CurrencyBalance"
import { timeUtils, activitiesUtils } from "#/utils"
import { Activity } from "#/types"
import BlockExplorerLink from "#/components/shared/BlockExplorerLink"
import BlockExplorerLink from "#/components/BlockExplorerLink"
import { IconArrowUpRight } from "@tabler/icons-react"
import { useActivities, useMobileMode } from "#/hooks"
import { semanticTokens } from "#/theme/utils"
Expand Down
2 changes: 1 addition & 1 deletion dapp/src/pages/DashboardPage/TransactionHistory/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react"
import { StackProps, VStack, Image, Text } from "@chakra-ui/react"
import { useActivitiesCount, useIsFetchedWalletData } from "#/hooks"
import UserDataSkeleton from "#/components/shared/UserDataSkeleton"
import UserDataSkeleton from "#/components/UserDataSkeleton"
import { emptyState } from "#/assets/images"
import TransactionTable from "./TransactionTable"

Expand Down
Loading