-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed width (prevents jumps). - Add a new “connecting” status, which only shows after a 500ms delay (making it invisible in most cases). - UI kit: add a new ShowAfter component. - Cut the text when too wide (ENS name resolution). Also: - Remove unnecessary hook dependencies in services/Ethereum.tsx.
- Loading branch information
Showing
6 changed files
with
129 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { ReactNode } from "react"; | ||
|
||
import { useEffect, useState } from "react"; | ||
|
||
export function ShowAfter({ | ||
children, | ||
delay, | ||
}: { | ||
children: ReactNode; | ||
delay: number; | ||
}) { | ||
const [show, setShow] = useState(false); | ||
|
||
useEffect(() => { | ||
const timeout = setTimeout(() => { | ||
setShow(true); | ||
}, delay); | ||
return () => { | ||
clearTimeout(timeout); | ||
}; | ||
}, [delay]); | ||
|
||
return show ? children : null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters