mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
remove unnecessary scripts
This commit is contained in:
@@ -2,5 +2,3 @@ node_modules
|
||||
node_modules_linux
|
||||
|
||||
playwright/envs.js
|
||||
public/static/js/jquery.mCustomScrollbar.concat.min.js
|
||||
public/static/js/jquery.min.js
|
||||
|
||||
@@ -77,7 +77,6 @@
|
||||
"@types/d3": "^7.4.0",
|
||||
"@types/dom-to-image": "^2.6.4",
|
||||
"@types/jest": "^29.2.0",
|
||||
"@types/jquery": "^3.5.14",
|
||||
"@types/js-cookie": "^3.0.2",
|
||||
"@types/node": "18.11.18",
|
||||
"@types/phoenix": "^1.5.4",
|
||||
|
||||
@@ -40,7 +40,6 @@ class MyDocument extends Document {
|
||||
<link rel="icon" sizes="16x16" type="image/png"href="/static/favicon-16x16.png"/>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png"/>
|
||||
<link rel="mask-icon" href="/static/safari-pinned-tab.svg" color="#5bbad5"/>
|
||||
<link rel="stylesheet" href="/static/css/jquery.mCustomScrollbar.min.css"/>
|
||||
</Head>
|
||||
<body>
|
||||
<ColorModeScript initialColorMode={ theme.config.initialColorMode }/>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
-2
File diff suppressed because one or more lines are too long
@@ -1,6 +1,5 @@
|
||||
import { Flex, Tag } from '@chakra-ui/react';
|
||||
import { useRouter } from 'next/router';
|
||||
import Script from 'next/script';
|
||||
import React from 'react';
|
||||
|
||||
import type { RoutedTab } from 'ui/shared/RoutedTabs/types';
|
||||
@@ -75,7 +74,6 @@ const TransactionPageContent = () => {
|
||||
backLinkLabel="Back to transactions list"
|
||||
/>
|
||||
<RoutedTabs tabs={ TABS }/>
|
||||
<Script src="/static/js/jquery.min.js" strategy="beforeInteractive"/>
|
||||
</Page>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -9,10 +9,9 @@ interface Props extends Omit<HTMLChakraProps<'div'>, 'title'> {
|
||||
hint: string;
|
||||
children: React.ReactNode;
|
||||
note?: string;
|
||||
noteDisplay?: string;
|
||||
}
|
||||
|
||||
const DetailsInfoItem = ({ title, hint, note, noteDisplay, children, id, ...styles }: Props) => {
|
||||
const DetailsInfoItem = ({ title, hint, note, children, id, ...styles }: Props) => {
|
||||
return (
|
||||
<>
|
||||
<GridItem py={{ base: 1, lg: 2 }} id={ id } lineHeight={ 5 } { ...styles } whiteSpace="nowrap" _notFirst={{ mt: { base: 3, lg: 0 } }}>
|
||||
@@ -28,7 +27,7 @@ const DetailsInfoItem = ({ title, hint, note, noteDisplay, children, id, ...styl
|
||||
</Tooltip>
|
||||
<Text fontWeight={{ base: 700, lg: 500 }}>
|
||||
{ title }
|
||||
{ note && <Text fontWeight={ 500 } color="gray.500" fontSize="xs" className="note" display={ noteDisplay } align="right">{ note }</Text> }
|
||||
{ note && <Text fontWeight={ 500 } variant="secondary" fontSize="xs" className="note" align="right">{ note }</Text> }
|
||||
</Text>
|
||||
</Flex>
|
||||
</GridItem>
|
||||
|
||||
@@ -87,7 +87,7 @@ const TxDetailsAction = ({ action, isLast }: Props) => {
|
||||
</Flex>
|
||||
<Flex columnGap={ 1 }>
|
||||
<Text as="span">To</Text>
|
||||
<AddressLink hash={ data.to }/>
|
||||
<AddressLink hash={ data.to } type="address"/>
|
||||
</Flex>
|
||||
</Flex>
|
||||
<Flex columnGap={ 1 } rowGap={ 2 } marginLeft={ 3 } flexDirection="column">
|
||||
|
||||
@@ -1,64 +1,32 @@
|
||||
import { Box, Flex } from '@chakra-ui/react';
|
||||
import Script from 'next/script';
|
||||
import { Flex } from '@chakra-ui/react';
|
||||
import React from 'react';
|
||||
|
||||
import type { TxAction as TTxAction } from 'types/api/txAction';
|
||||
import type { TxAction } from 'types/api/txAction';
|
||||
|
||||
import DetailsInfoItem from 'ui/shared/DetailsInfoItem';
|
||||
|
||||
import TxDetailsAction from './TxDetailsAction';
|
||||
|
||||
interface Props {
|
||||
actions: Array<TTxAction>;
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface JQuery {
|
||||
mCustomScrollbar(options: object): void;
|
||||
}
|
||||
actions: Array<TxAction>;
|
||||
}
|
||||
|
||||
const TxDetailsActions = ({ actions }: Props) => {
|
||||
function onScrollbarLoad() {
|
||||
const customScrollBar = $('.mCustomScrollbar');
|
||||
customScrollBar.mCustomScrollbar({ callbacks: {
|
||||
onOverflowY: () => {
|
||||
$('#txActionsTitle .note').css('display', 'block');
|
||||
customScrollBar.removeClass('mCS_no_scrollbar_y');
|
||||
},
|
||||
onOverflowYNone: () => {
|
||||
$('#txActionsTitle .note').css('display', 'none');
|
||||
customScrollBar.addClass('mCS_no_scrollbar_y');
|
||||
},
|
||||
},
|
||||
theme: 'dark',
|
||||
autoHideScrollbar: true,
|
||||
scrollButtons: { enable: false },
|
||||
scrollbarPosition: 'outside' });
|
||||
}
|
||||
|
||||
return (
|
||||
<DetailsInfoItem
|
||||
title="Transaction Action"
|
||||
hint="Highlighted events of the transaction"
|
||||
note="Scroll to see more"
|
||||
noteDisplay="none"
|
||||
position="relative"
|
||||
id="txActionsTitle"
|
||||
>
|
||||
<Box className="mCustomScrollbar" maxH={ 36 } w="98%" overflow="hidden">
|
||||
<Flex
|
||||
flexDirection="column"
|
||||
alignItems="flex-start"
|
||||
rowGap={ 5 }
|
||||
w="100%"
|
||||
fontWeight={ 500 }
|
||||
>
|
||||
{ actions.map((action, index: number) => <TxDetailsAction key={ index } action={ action } isLast={ index === actions.length - 1 }/>) }
|
||||
</Flex>
|
||||
</Box>
|
||||
{ /* eslint-disable-next-line react/jsx-no-bind */ }
|
||||
<Script src="/static/js/jquery.mCustomScrollbar.concat.min.js" strategy="afterInteractive" onLoad={ onScrollbarLoad }/>
|
||||
<Flex
|
||||
flexDirection="column"
|
||||
alignItems="flex-start"
|
||||
rowGap={ 5 }
|
||||
w="100%"
|
||||
fontWeight={ 500 }
|
||||
>
|
||||
{ actions.map((action, index: number) => <TxDetailsAction key={ index } action={ action } isLast={ index === actions.length - 1 }/>) }
|
||||
</Flex>
|
||||
</DetailsInfoItem>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -3936,13 +3936,6 @@
|
||||
expect "^29.0.0"
|
||||
pretty-format "^29.0.0"
|
||||
|
||||
"@types/jquery@^3.5.14":
|
||||
version "3.5.14"
|
||||
resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.5.14.tgz#ac8e11ee591e94d4d58da602cb3a5a8320dee577"
|
||||
integrity sha512-X1gtMRMbziVQkErhTQmSe2jFwwENA/Zr+PprCkF63vFq+Yt5PZ4AlKqgmeNlwgn7dhsXEK888eIW2520EpC+xg==
|
||||
dependencies:
|
||||
"@types/sizzle" "*"
|
||||
|
||||
"@types/js-cookie@^3.0.2":
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/js-cookie/-/js-cookie-3.0.2.tgz#451eaeece64c6bdac8b2dde0caab23b085899e0d"
|
||||
@@ -4098,11 +4091,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91"
|
||||
integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==
|
||||
|
||||
"@types/sizzle@*":
|
||||
version "2.3.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.3.tgz#ff5e2f1902969d305225a047c8a0fd5c915cebef"
|
||||
integrity sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==
|
||||
|
||||
"@types/stack-utils@^2.0.0":
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c"
|
||||
|
||||
Reference in New Issue
Block a user