Skip to content

Commit

Permalink
fix(canonical-bridge-widget): Fix tron icon display issue on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
wenty22 committed Oct 21, 2024
1 parent 56de81f commit 535bb24
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/canonical-bridge-ui/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ export default class Document extends NextDocument {
<Html lang="en">
<Head>
<link rel="stylesheet" href={`${env.ASSET_PREFIX}/fonts/index.css`} />
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js" defer></script>
<script
dangerouslySetInnerHTML={{
__html: `
window.onload = () => {
new window.VConsole();
}
`,
}}
></script>
</Head>
<body>
<ColorModeScript initialColorMode={theme.config.initialColorMode} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ export const ProfileMenu = () => {
pl={{ base: '0', md: '12px' }}
pr={{ base: '0', md: '16px' }}
>
{/* Don't remove the below component, otherwise tron icon will be abnormal on mobile */}
<Center
boxSize={1}
opacity={0}
position="absolute"
left={0}
zIndex={-1}
sx={{
opacity: 0,
boxSize: 1,
}}
>
{walletIcon}
</Center>
{walletIcon && (
<Center
sx={{
Expand Down

0 comments on commit 535bb24

Please sign in to comment.