Hide swap-ui tab bar for extension (#301)

This commit is contained in:
Armani Ferrante 2021-06-16 16:23:39 -07:00 committed by GitHub
parent d2c73e3011
commit e1abd5ee47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

View File

@ -9,7 +9,7 @@
"@material-ui/lab": "^4.0.0-alpha.58",
"@project-serum/anchor": "^0.7.0",
"@project-serum/serum": "^0.13.33",
"@project-serum/swap-ui": "^0.1.5",
"@project-serum/swap-ui": "^0.1.6",
"@solana/spl-token-registry": "^0.2.102",
"@solana/web3.js": "^1.10.1",
"@testing-library/jest-dom": "^5.11.6",

View File

@ -16,11 +16,12 @@ import { useTokenInfos } from '../utils/tokens/names';
import { useSendTransaction } from '../utils/notifications';
import { useWallet } from '../utils/wallet';
import { useConnection } from '../utils/connection';
import { isExtension } from '../utils/utils';
import { useIsExtensionWidth } from '../utils/utils';
import DialogForm from './DialogForm';
export default function SwapButton({ size }) {
if (isExtension) {
const isExtensionWidth = useIsExtensionWidth();
if (isExtensionWidth) {
return <SwapButtonDialog />;
} else {
return <SwapButtonPopover />;

View File

@ -1938,10 +1938,10 @@
bn.js "^5.1.2"
buffer-layout "^1.2.0"
"@project-serum/swap-ui@^0.1.5":
version "0.1.5"
resolved "https://registry.yarnpkg.com/@project-serum/swap-ui/-/swap-ui-0.1.5.tgz#ec15d52781a34eca346103fc7a4ffd39070caf2c"
integrity sha512-K0ujOrglu+m2bjV9VZF4vl9+LVY1+PEUE7S7DPMUZJvcg1UtmcA9ecsaHqJcbuh3eLfQOXST75PBbX1V1ca3Tw==
"@project-serum/swap-ui@^0.1.6":
version "0.1.6"
resolved "https://registry.yarnpkg.com/@project-serum/swap-ui/-/swap-ui-0.1.6.tgz#745f6d7a287a2e662416689f9a4b417bf62406d6"
integrity sha512-ltCNk/CBFBwTq1LB9IifKIAmKSP6JKQXy19+VZymhGhd2gn5rphW7UNE8k3PoIn3X7ZGuiHiK4B/6c6qnh7pQw==
dependencies:
"@fontsource/roboto" "^4.3.0"
"@project-serum/serum" "^0.13.34"