diff --git a/packages/apps/dev-wallet/src/pages/contacts/Components/ContactForm.tsx b/packages/apps/dev-wallet/src/pages/contacts/Components/ContactForm.tsx index c35d1f907b..79952a18c0 100644 --- a/packages/apps/dev-wallet/src/pages/contacts/Components/ContactForm.tsx +++ b/packages/apps/dev-wallet/src/pages/contacts/Components/ContactForm.tsx @@ -35,8 +35,6 @@ export function ContactForm({ onDone: (contect: IContact) => void; isOpen: boolean; }) { - console.log({ input }); - const prompt = usePrompt(); const { activeNetwork } = useWallet(); const [error, setError] = useState(null); @@ -56,8 +54,6 @@ export function ContactForm({ }); useEffect(() => { - console.log({ input }); - if (!input) { reset( { diff --git a/packages/apps/dev-wallet/src/pages/transfer-v2/Steps/TransferForm.tsx b/packages/apps/dev-wallet/src/pages/transfer-v2/Steps/TransferForm.tsx index 696c12221f..d6a1507893 100644 --- a/packages/apps/dev-wallet/src/pages/transfer-v2/Steps/TransferForm.tsx +++ b/packages/apps/dev-wallet/src/pages/transfer-v2/Steps/TransferForm.tsx @@ -25,7 +25,14 @@ import { TextField, } from '@kadena/kode-ui'; import { PactNumber } from '@kadena/pactjs'; -import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import { + Fragment, + useCallback, + useEffect, + useMemo, + useRef, + useState, +} from 'react'; import { Controller, useForm } from 'react-hook-form'; import { DiscoverdAccounts } from '../../transfer/components/DiscoverdAccounts'; import { linkClass } from '../../transfer/style.css'; @@ -316,6 +323,7 @@ export function TransferForm({ render={({ field }) => ( Address:} // label="Account" placeholder="Select and address" @@ -363,6 +372,7 @@ export function TransferForm({ control={control} render={({ field }) => ( Chain:} // label={index === 0 ? 'Chain' : undefined} placeholder="Select a chain" @@ -830,7 +843,7 @@ export function TransferForm({ )} - + ); })} @@ -854,6 +867,7 @@ export function TransferForm({ control={control} render={({ field }) => ( { @@ -440,6 +441,7 @@ export function Transfer() { @@ -453,6 +455,7 @@ export function Transfer() { name="transferAll" render={({ field }) => ( diff --git a/packages/libs/kode-ui/src/patterns/SideBarLayout/SideBarLayout.tsx b/packages/libs/kode-ui/src/patterns/SideBarLayout/SideBarLayout.tsx index baf16fb08f..fd618b59b5 100644 --- a/packages/libs/kode-ui/src/patterns/SideBarLayout/SideBarLayout.tsx +++ b/packages/libs/kode-ui/src/patterns/SideBarLayout/SideBarLayout.tsx @@ -32,7 +32,12 @@ export const SideBarLayout: FC = ({ variant = 'default', location, }) => { - const { isExpanded, setLocation } = useLayout(); + const { + isExpanded, + setLocation, + isRightAsideExpanded, + setIsRightAsideExpanded, + } = useLayout(); // set the active URL in your app. //we dont know what route system is being used so the active URL will be given as a prop to the component @@ -41,6 +46,11 @@ export const SideBarLayout: FC = ({ setLocation(location); }, [location?.url, location?.hash]); + useEffect(() => { + if (!isRightAsideExpanded) return; + setIsRightAsideExpanded(false); + }, [location?.url]); + return ( = ({ children, isOpen }) => { - const { - rightAsideRef, - location, - setIsRightAsideExpanded, - isRightAsideExpanded, - } = useLayout(); - - useEffect(() => { - if (!isRightAsideExpanded) return; - setIsRightAsideExpanded(false); - }, [location?.url]); + const { rightAsideRef } = useLayout(); if (!isOpen || !rightAsideRef) return null;