Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export function MyJobsListMobile() {
{allPages.map((d) => {
return (
<Paper
key={crypto.randomUUID()}
key={d.escrow_address}
sx={{
px: '16px',
py: '32px',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ export const operatorDrawerBottomMenuItems: MenuItem[] = [
}
},
},
<DarkModeSwitch key={crypto.randomUUID()} />,
<DarkModeSwitch key="dark-mode-switch" />,
];
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ export const workerDrawerBottomMenuItems: MenuItem[] = [
}
},
},
<DarkModeSwitch key={crypto.randomUUID()} />,
<DarkModeSwitch key="dark-mode-switch" />,
];
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function Select({
}
>
{options.map((elem) => (
<MenuItem key={crypto.randomUUID().toString()} value={elem.value}>
<MenuItem key={elem.value} value={elem.value}>
{elem.name}
</MenuItem>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ import { useColorMode } from '@/shared/contexts/color-mode';

interface ChipProps {
label: string | React.ReactElement;
key?: string;
backgroundColor?: string;
}

export function Chip({ label, backgroundColor }: Readonly<ChipProps>) {
const { colorPalette } = useColorMode();

return (
<Box
component="span"
key={crypto.randomUUID()}
sx={{
backgroundColor: backgroundColor ?? colorPalette.chip.main,
width: 'fit-content',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function Chips({ data }: ChipsProps) {
return (
<Grid container sx={{ flexWrap: 'wrap', gap: '0.5rem' }}>
{data.map((chipLabel) => (
<Chip key={crypto.randomUUID()} label={chipLabel} />
<Chip key={chipLabel} label={chipLabel} />
))}
</Grid>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ export const WalletConnectContext = createContext<
| null
>(null);

export function WalletConnectProvider({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
function AppKitWrapper({ children }: { children: React.ReactNode }) {
const [initializing, setInitializing] = useState(true);
const web3ProviderMutation = useWeb3Provider();
const { open } = useAppKit();
Expand All @@ -70,7 +66,7 @@ export function WalletConnectProvider({
) {
setInitializing(false);
}
}, [web3ProviderMutation]);
}, [web3ProviderMutation.status]);
Comment thread
KirillKirill marked this conversation as resolved.

const openModal = useCallback(async () => {
await open();
Expand Down Expand Up @@ -122,11 +118,21 @@ export function WalletConnectProvider({
initializing,
]);

return (
<WalletConnectContext.Provider value={contextValue}>
{children}
</WalletConnectContext.Provider>
);
}

export function WalletConnectProvider({
children,
}: {
children: React.ReactNode;
}) {
return (
<WagmiProvider config={wagmiAdapter.wagmiConfig}>
<WalletConnectContext.Provider value={contextValue}>
{children}
</WalletConnectContext.Provider>
<AppKitWrapper>{children}</AppKitWrapper>
</WagmiProvider>
);
}
Loading