Skip to content

Commit

Permalink
Removed timeout from lazy loader component
Browse files Browse the repository at this point in the history
  • Loading branch information
nullhook committed Dec 15, 2022
1 parent 536e074 commit 95657c7
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions components/brave_welcome_ui/components/loader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,10 @@ const Graphic = styled('div')`
`

export default function Loader () {
const [show, setShow] = React.useState(false)

React.useEffect(() => {
const timerId = setTimeout(() => setShow(true), 100)

return () => {
clearTimeout(timerId)
}
}, [])

return (
<Loading aria-busy='true'>
<Graphic aria-label='Loading'>
{ show ? <LoaderIcon /> : null }
<LoaderIcon />
</Graphic>
</Loading>
)
Expand Down

0 comments on commit 95657c7

Please sign in to comment.