This repository has been archived by the owner on Nov 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Return null instead of Fragment
- Loading branch information
1 parent
91ba1a6
commit ab3db4e
Showing
2 changed files
with
16 additions
and
6 deletions.
There are no files selected for viewing
19 changes: 16 additions & 3 deletions
19
src/components/AppLayout/Header/components/ProviderDetails/HidePairingModule.tsx
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 |
---|---|---|
@@ -1,6 +1,19 @@ | ||
import 'src/components/AppLayout/Header/components/ProviderDetails/hidePairingModule.css' | ||
import { ReactElement } from 'react' | ||
import { useEffect } from 'react' | ||
|
||
const HidePairingModule = (): ReactElement => <></> | ||
const HIDE_PAIRING_STYLE = '.bn-onboard-modal-select-wallets li:first-of-type {display: none;}' | ||
|
||
const HidePairingModule = (): null => { | ||
useEffect(() => { | ||
const style = document.createElement('style') | ||
style.innerHTML = HIDE_PAIRING_STYLE | ||
document.head.appendChild(style) | ||
|
||
return () => { | ||
style.remove() | ||
} | ||
}, []) | ||
|
||
return null | ||
} | ||
|
||
export default HidePairingModule |
3 changes: 0 additions & 3 deletions
3
src/components/AppLayout/Header/components/ProviderDetails/hidePairingModule.css
This file was deleted.
Oops, something went wrong.