Skip to content

Commit

Permalink
fix: use DropDown menu from monorepo for Settings, ref leather-io/iss…
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Jun 27, 2024
1 parent de2b5a0 commit 65131b0
Show file tree
Hide file tree
Showing 19 changed files with 116 additions and 298 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@
"@dlc-link/dlc-tools": "1.1.1",
"@fungible-systems/zone-file": "2.0.0",
"@hirosystems/token-metadata-api-client": "1.2.0",
"@leather.io/bitcoin": "0.8.0",
"@leather.io/bitcoin": "0.8.1",
"@leather.io/constants": "0.8.0",
"@leather.io/crypto": "1.0.2",
"@leather.io/models": "0.10.0",
"@leather.io/query": "0.9.1",
"@leather.io/query": "0.9.2",
"@leather.io/tokens": "0.6.0",
"@leather.io/ui": "1.5.1",
"@leather.io/utils": "0.9.0",
"@leather.io/utils": "0.9.1",
"@ledgerhq/hw-transport-webusb": "6.27.19",
"@noble/hashes": "1.4.0",
"@noble/secp256k1": "2.1.0",
Expand Down
163 changes: 79 additions & 84 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { useCallback, useState } from 'react';
import { useLocation, useNavigate } from 'react-router-dom';

import { Dialog, Link } from '@leather.io/ui';
import { useFormikContext } from 'formik';
import { Stack, styled } from 'leather-styles/jsx';

import { Dialog, Link } from '@leather.io/ui';

import { StacksSendFormValues, StacksTransactionFormValues } from '@shared/models/form.model';

import { useOnMount } from '@app/common/hooks/use-on-mount';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Suspense } from 'react';
import { Outlet, useLocation, useNavigate } from 'react-router-dom';

import { Formik } from 'formik';
import { Flex, Stack } from 'leather-styles/jsx';

import type { BitcoinTx } from '@leather.io/models';
import { Caption, Dialog, Spinner } from '@leather.io/ui';
import { btcToSat, createMoney, formatMoney } from '@leather.io/utils';
import { Formik } from 'formik';
import { Flex, Stack } from 'leather-styles/jsx';

import { RouteUrls } from '@shared/route-urls';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import { Suspense, useCallback, useEffect } from 'react';
import { Outlet, useLocation, useNavigate, useParams } from 'react-router-dom';

import { type StacksTransaction } from '@stacks/transactions';
import BigNumber from 'bignumber.js';
import { Formik } from 'formik';
import { Flex, Stack } from 'leather-styles/jsx';
import * as yup from 'yup';

import {
useStacksRawTransaction,
useStxAvailableUnlockedBalance,
useTransactionById,
} from '@leather.io/query';
import { Caption, Dialog, Spinner } from '@leather.io/ui';
import { microStxToStx, stxToMicroStx } from '@leather.io/utils';
import { type StacksTransaction } from '@stacks/transactions';
import BigNumber from 'bignumber.js';
import { Formik } from 'formik';
import { Flex, Stack } from 'leather-styles/jsx';
import * as yup from 'yup';

import { RouteUrls } from '@shared/route-urls';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { memo } from 'react';
import { Virtuoso } from 'react-virtuoso';

import { Button, Dialog } from '@leather.io/ui';
import { Box } from 'leather-styles/jsx';

import { Button, Dialog } from '@leather.io/ui';

import { useCreateAccount } from '@app/common/hooks/account/use-create-account';
import { useWalletType } from '@app/common/use-wallet-type';
import { useCurrentAccountIndex } from '@app/store/accounts/account';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { useNavigate } from 'react-router-dom';

import { Dialog, Link } from '@leather.io/ui';
import { styled } from 'leather-styles/jsx';

import { Dialog, Link } from '@leather.io/ui';

import { UnsupportedBrowserImg } from '@app/features/ledger/illustrations/ledger-illu-unsupported-browser';
import { DialogHeader } from '@app/ui/components/containers/headers/dialog-header';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { BtcAvatarIcon, Button, Callout, Dialog } from '@leather.io/ui';
import { Flex, styled } from 'leather-styles/jsx';

import { BtcAvatarIcon, Button, Callout, Dialog } from '@leather.io/ui';

import { Footer } from '@app/ui/components/containers/footers/footer';
import { DialogHeader } from '@app/ui/components/containers/headers/dialog-header';
import { Card } from '@app/ui/layout/card/card';
Expand Down
3 changes: 2 additions & 1 deletion src/app/features/settings/network/network.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { useNavigate } from 'react-router-dom';

import { SettingsSelectors } from '@tests/selectors/settings.selectors';

import { WalletDefaultNetworkConfigurationIds } from '@leather.io/models';
import { Button, Dialog } from '@leather.io/ui';
import { SettingsSelectors } from '@tests/selectors/settings.selectors';

import { RouteUrls } from '@shared/route-urls';
import { analytics } from '@shared/utils/analytics';
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/settings/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Flex, Stack, styled } from 'leather-styles/jsx';

import {
Caption,
DropdownMenu,
ExitIcon,
ExpandIcon,
ExternalLinkIcon,
Expand Down Expand Up @@ -35,7 +36,6 @@ import { ThemeDialog } from '@app/features/settings/theme/theme-dialog';
import { useCurrentStacksAccount } from '@app/store/accounts/blockchain/stacks/stacks-account.hooks';
import { useHasLedgerKeys, useLedgerDeviceTargetId } from '@app/store/ledger/ledger.selectors';
import { useCurrentNetworkId } from '@app/store/networks/networks.selectors';
import { DropdownMenu } from '@app/ui/components/dropdown-menu/dropdown-menu';

import { openFeedbackDialog } from '../feedback-button/feedback-button';
import { extractDeviceNameFromKnownTargetIds } from '../ledger/utils/generic-ledger-utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Button, Caption, Dialog, ErrorIcon, Link, Title } from '@leather.io/ui';
import { SendCryptoAssetSelectors } from '@tests/selectors/send.selectors';
import { useFormikContext } from 'formik';
import { HStack, Stack } from 'leather-styles/jsx';

import { Button, Caption, Dialog, ErrorIcon, Link, Title } from '@leather.io/ui';

import { StacksSendFormValues } from '@shared/models/form.model';

import { openInNewTab } from '@app/common/utils/open-in-new-tab';
Expand Down
3 changes: 2 additions & 1 deletion src/app/pages/receive/components/receive-tokens.layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import QRCode from 'react-qr-code';
import { useNavigate } from 'react-router-dom';

import { AddressDisplayer, Button, Dialog } from '@leather.io/ui';
import { SharedComponentsSelectors } from '@tests/selectors/shared-component.selectors';
import { Box, Flex, styled } from 'leather-styles/jsx';
import { token } from 'leather-styles/tokens';

import { AddressDisplayer, Button, Dialog } from '@leather.io/ui';

import { useLocationState } from '@app/common/hooks/use-location-state';
import { useBackgroundLocationRedirect } from '@app/routes/hooks/use-background-location-redirect';
import { Footer } from '@app/ui/components/containers/footers/footer';
Expand Down
3 changes: 2 additions & 1 deletion src/app/pages/receive/receive-dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { useLocation, useNavigate } from 'react-router-dom';

import { Dialog, Tabs } from '@leather.io/ui';
import { HomePageSelectors } from '@tests/selectors/home.selectors';
import { Box } from 'leather-styles/jsx';
import get from 'lodash.get';

import { Dialog, Tabs } from '@leather.io/ui';

import { RouteUrls } from '@shared/route-urls';
import { analytics } from '@shared/utils/analytics';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useNavigate } from 'react-router-dom';

import { Button, Dialog, OrdinalAvatarIcon } from '@leather.io/ui';
import { Form, Formik } from 'formik';
import { Box, Flex } from 'leather-styles/jsx';

import { Button, Dialog, OrdinalAvatarIcon } from '@leather.io/ui';

import { RouteUrls } from '@shared/route-urls';

import { ErrorLabel } from '@app/components/error-label';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { useLocation, useNavigate } from 'react-router-dom';

import { useBitcoinBroadcastTransaction } from '@leather.io/query';
import { Button, Dialog } from '@leather.io/ui';
import { bytesToHex } from '@noble/hashes/utils';
import { Box, Flex, Stack } from 'leather-styles/jsx';
import get from 'lodash.get';

import { useBitcoinBroadcastTransaction } from '@leather.io/query';
import { Button, Dialog } from '@leather.io/ui';

import { RouteUrls } from '@shared/route-urls';
import { analytics } from '@shared/utils/analytics';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { useLocation, useNavigate } from 'react-router-dom';

import type { Blockchains, Inscription } from '@leather.io/models';
import { CheckmarkIcon, CopyIcon, Dialog, ExternalLinkIcon } from '@leather.io/ui';
import { Box, Flex, HStack, Stack } from 'leather-styles/jsx';
import get from 'lodash.get';

import type { Blockchains, Inscription } from '@leather.io/models';
import { CheckmarkIcon, CopyIcon, Dialog, ExternalLinkIcon } from '@leather.io/ui';

import { RouteUrls } from '@shared/route-urls';
import { analytics } from '@shared/utils/analytics';

Expand Down
16 changes: 0 additions & 16 deletions src/app/ui/components/dropdown-menu/dropdown-menu-item.layout.tsx

This file was deleted.

47 changes: 0 additions & 47 deletions src/app/ui/components/dropdown-menu/dropdown-menu.stories.tsx

This file was deleted.

Loading

0 comments on commit 65131b0

Please sign in to comment.