Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fixed chakra provider missing/single child issue #2006

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/app/_components/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ export const Providers = ({
const querySubnet = Array.isArray(subnet) ? subnet[0] : subnet;

return (
<GlobalContextProvider
addedCustomNetworksCookie={addedCustomNetworksCookie}
removedCustomNetworksCookie={removedCustomNetworksCookie}
>
<CookiesProvider>
<ChakraProvider value={system}>
<ChakraProvider value={system}>
<GlobalContextProvider
addedCustomNetworksCookie={addedCustomNetworksCookie}
removedCustomNetworksCookie={removedCustomNetworksCookie}
>
<CookiesProvider>
<ColorModeProvider>
<ReduxProvider store={store}>
<AppConfig // TODO: rename to something else like SessionProvider
Expand All @@ -63,8 +63,8 @@ export const Providers = ({
</AppConfig>
</ReduxProvider>
</ColorModeProvider>
</ChakraProvider>
</CookiesProvider>
</GlobalContextProvider>
</CookiesProvider>
</GlobalContextProvider>
</ChakraProvider>
);
};
6 changes: 4 additions & 2 deletions src/features/search/items/address-result-item.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Flex } from '@chakra-ui/react';
import { Box, Flex, Icon } from '@chakra-ui/react';

Check warning on line 1 in src/features/search/items/address-result-item.tsx

View check run for this annotation

Codecov / codecov/patch

src/features/search/items/address-result-item.tsx#L1

Added line #L1 was not covered by tests
import React from 'react';

import { Circle } from '../../../common/components/Circle';
Expand All @@ -25,7 +25,9 @@
<ResultItemWrapper>
<Flex alignItems="center">
<Circle h={12} w={12}>
<WalletIcon size={4} />
<Icon h={4} w={4}>
<WalletIcon />
</Icon>
</Circle>
<Box ml={4}>
<Title display="block" mb="4px" className={'search-result-title'}>
Expand Down
34 changes: 21 additions & 13 deletions src/ui/icons/WalletIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
'use client';

import { Icon } from '@chakra-ui/react';
import { IconProps } from '@phosphor-icons/react';
import { forwardRef } from 'react';
import { Icon, IconBase, IconWeight } from '@phosphor-icons/react';
import { ReactElement, forwardRef } from 'react';

const WalletIcon = forwardRef<SVGSVGElement, IconProps>(({ size = '44px' }, ref) => (
<Icon
const weights = new Map<IconWeight, ReactElement>([
[
'regular',
<>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M17 8v-3a1 1 0 0 0 -1 -1h-10a2 2 0 0 0 0 4h12a1 1 0 0 1 1 1v3m0 4v3a1 1 0 0 1 -1 1h-12a2 2 0 0 1 -2 -2v-12" />
<path d="M20 12v4h-4a2 2 0 0 1 0 -4h4" />
</>,
],
]);

const WalletIcon: Icon = forwardRef((props, ref) => (
<IconBase
ref={ref}
{...props}
weights={weights}
viewBox="0 0 24 24"
strokeWidth="1"
stroke="currentColor"
fill="none"
strokeLinecap="round"
strokeLinejoin="round"
h={size}
w={size}
ref={ref}
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M17 8v-3a1 1 0 0 0 -1 -1h-10a2 2 0 0 0 0 4h12a1 1 0 0 1 1 1v3m0 4v3a1 1 0 0 1 -1 1h-12a2 2 0 0 1 -2 -2v-12" />
<path d="M20 12v4h-4a2 2 0 0 1 0 -4h4" />
</Icon>
/>
));

WalletIcon.displayName = 'WalletIcon';

export default WalletIcon;
Loading