Skip to content

Commit

Permalink
Remove unneeded code in the dApp
Browse files Browse the repository at this point in the history
  • Loading branch information
kkosiorowska committed Dec 10, 2024
1 parent b1daca7 commit 191f19a
Show file tree
Hide file tree
Showing 19 changed files with 2 additions and 271 deletions.
1 change: 0 additions & 1 deletion dapp/src/assets/images/mezo-beehive-modal-illustration.svg

This file was deleted.

Binary file removed dapp/src/assets/webps/confetti.webp
Binary file not shown.

This file was deleted.

35 changes: 0 additions & 35 deletions dapp/src/components/shared/ButtonLink.tsx

This file was deleted.

27 changes: 0 additions & 27 deletions dapp/src/components/shared/IconTag.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions dapp/src/components/shared/NavLink.tsx

This file was deleted.

1 change: 0 additions & 1 deletion dapp/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export * from "./externalHref"
export { default as featureFlags } from "./featureFlags"
export { default as queryKeysFactory } from "./queryKeysFactory"
export { default as screen } from "./screen"
export * from "./staking"
export { default as tbtc } from "./tbtc"
export * from "./time"
export { default as wallets } from "./wallets"
2 changes: 0 additions & 2 deletions dapp/src/constants/staking.ts

This file was deleted.

1 change: 0 additions & 1 deletion dapp/src/hooks/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from "./useIsActiveRoute"
export { default as useAppNavigate } from "./useAppNavigate"
10 changes: 0 additions & 10 deletions dapp/src/hooks/router/useIsActiveRoute.ts

This file was deleted.

25 changes: 1 addition & 24 deletions dapp/src/pages/DashboardPage/PositionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ import {
useActivities,
} from "#/hooks"
import { ACTION_FLOW_TYPES } from "#/types"
import {
Button,
ButtonProps,
Flex,
HStack,
// Tag,
VStack,
} from "@chakra-ui/react"
import { Button, ButtonProps, Flex, HStack, VStack } from "@chakra-ui/react"
import ArrivingSoonTooltip from "#/components/ArrivingSoonTooltip"
import UserDataSkeleton from "#/components/shared/UserDataSkeleton"
import { featureFlags } from "#/constants"
Expand Down Expand Up @@ -69,22 +62,6 @@ export default function PositionDetails() {
placement="right"
/>
)}
{/* TODO: Uncomment when position will be implemented */}
{/* {positionPercentage && (
<Tag
px={3}
py={1}
ml={2}
borderWidth={0}
color="gold.100"
bg="gold.700"
fontWeight="bold"
lineHeight={5}
verticalAlign="baseline"
>
Top {positionPercentage}%
</Tag>
)} */}
</HStack>
<UserDataSkeleton>
<VStack alignItems="start" spacing={0}>
Expand Down
27 changes: 0 additions & 27 deletions dapp/src/pages/DashboardPage/UsefulLinks.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions dapp/src/types/core.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
export type Tuple<T> = [T, T]

export type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] }

export type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>
1 change: 0 additions & 1 deletion dapp/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ export * from "./form"
export * from "./eip1193"
export * from "./status"
export * from "./orangekit"
export * from "./ledgerLive"
export * from "./dapp-mode"
5 changes: 0 additions & 5 deletions dapp/src/types/ledgerLive.ts

This file was deleted.

1 change: 0 additions & 1 deletion dapp/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export * from "./address"
export * from "./forms"
export * from "./currency"
export * from "./chain"
export * from "./text"
export * from "./time"
export * from "./promise"
export * from "./verifyDepositAddress"
Expand Down
6 changes: 1 addition & 5 deletions dapp/src/utils/router.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { To, redirect } from "react-router-dom"
import { isString } from "./type-check"

const getURLPath = (to: To) => (isString(to) ? to : to.pathname)
import { redirect } from "react-router-dom"

const getURLParamFromHref = (href: string, paramName: string) => {
const { searchParams } = new URL(href)
Expand All @@ -19,7 +16,6 @@ const redirectWithSearchParams = (url: string, to: string) => {
}

export default {
getURLPath,
getURLParam,
getURLParamFromHref,
redirectWithSearchParams,
Expand Down
2 changes: 0 additions & 2 deletions dapp/src/utils/text.ts

This file was deleted.

1 change: 0 additions & 1 deletion dapp/src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ interface ImportMetaEnv {
readonly VITE_ACRE_API_ENDPOINT: string
readonly VITE_POSTHOG_API_HOST: string
readonly VITE_POSTHOG_API_KEY: string
readonly VITE_FEATURE_MOBILE_MODE_ENABLED: string
}

interface ImportMeta {
Expand Down

0 comments on commit 191f19a

Please sign in to comment.