Skip to content

Commit

Permalink
Fit icon to header height
Browse files Browse the repository at this point in the history
  • Loading branch information
JunichiSugiura committed May 15, 2024
1 parent b766c04 commit d02f9ff
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ const connectors = [
{
url,
icon: {
light: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjkiIGhlaWdodD0iNTciIHZpZXdCb3g9IjAgMCA2OSA1NyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMy41NTEzIDAuMDM5MDYyNUg0NC42Mjc4TDQ0LjcwMTIgMC4wNDE3NTc4QzQ2LjI2MjQgMC4wOTkwOTkyIDQ3Ljc5NDggMC40NzQ3OTUgNDkuMjA0OSAxLjE0NTA5TDYzLjUyMjcgNy4xODc5NUw2My42NTIyIDcuMjU0MDRDNjUuMDExOCA3Ljk0ODEyIDY2LjE0NzggOS4wMTA3NyA2Ni45MzE2IDEwLjMxOTNDNjcuNzA4MSAxMS42MTU3IDY4LjEwODUgMTMuMTAyMSA2OC4wODg5IDE0LjYxMjFWMzguNjg0QzY4LjA4ODkgMzguNzEgNjguMDg5IDM4LjczNzYgNjguMDg5MSAzOC43NjY2QzY4LjA5MTQgMzkuNjQwOSA2OC4wOTc0IDQxLjgzNTYgNjYuMTY5NyA0My43NjgxTDYxLjY2MjYgNDguMjg2NUM2MC44OTEzIDQ5LjA1OTggNTkuOTY3IDQ5LjY3NDkgNTguODA3IDQ5Ljk4NDlDNTcuOTIxNyA1MC4yMjE1IDU3LjA1MzUgNTAuMjE3IDU2LjY2MyA1MC4yMTVDNTYuNjMxMSA1MC4yMTQ4IDU2LjYwMjQgNTAuMjE0NyA1Ni41NzcxIDUwLjIxNDdMNTAuMzM4NSA1M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dmlld0JveD0iMCAwIDEwMCAxMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiIGZpbGw9IiNGRkJDQjRBICIvPjxjaXJjbGUgY3g9IjUwIiBjeT0iNTAiIHI9IjQwIiBmaWxsPSIjMEYxNDEwIi8+PC9zdmc+",
dark: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiIGZpbGw9IiMwMDAwMDAiLz48Y2lyY2xlIGN4PSI1MCIgY3k9IjUwIiByPSI0MCIgZmlsbD0iI0ZGRiIvPjwvc3ZnPg=="
},
theme: {
colors: {
Expand Down
1 change: 1 addition & 0 deletions examples/starknet-react-next/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { DojoSpawnAndMove } from "components/DojoSpawnAndMove";
const Home: NextPage = () => {
return (
<div>
NEXT_PUBLIC_VERCEL_BRANCH_URL: {process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL}
<h2>Wallet</h2>
<ConnectWallet />
<DojoSpawnAndMove />
Expand Down
2 changes: 0 additions & 2 deletions packages/controller/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ class Controller {
if (!icon) return;
url.searchParams.set("icon", encodeURIComponent(JSON.stringify(icon)));

console.log("!!!", url.toString());

this.url = url.toString();
}

Expand Down
5 changes: 2 additions & 3 deletions packages/keychain/src/components/Container/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
Container as ChakraContainer,
StyleProps,
IconButton,
useTheme,
useColorMode,
} from "@chakra-ui/react";
import { constants } from "starknet";
Expand Down Expand Up @@ -61,7 +60,7 @@ export function Header({
return (
<Container h={12} p={1.5}>
{/* eslint-disable-next-line @next/next/no-img-element */}
{icon ? <img src={icon} alt="Controller icon" /> : <CartridgeLogo boxSize={28} />}
{icon ? <img src={icon} alt="Controller icon" style={{ height: "100%" }} /> : <CartridgeLogo boxSize={28} />}

Check failure

Code scanning / CodeQL

Client-side cross-site scripting High

Cross-site scripting vulnerability due to
user-provided value
.

Check warning

Code scanning / CodeQL

Client-side URL redirect Medium

Untrusted URL redirection depends on a
user-provided value
.
</Container>
);
}
Expand Down Expand Up @@ -115,7 +114,7 @@ function Container({
bg="solid.bg"
{...rest}
>
<ChakraContainer p={0} centerContent>
<ChakraContainer p={0} h="full" centerContent>
{children}
</ChakraContainer>
</Flex>
Expand Down

0 comments on commit d02f9ff

Please sign in to comment.