Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
fix: dark mode bug (#2002)
Browse files Browse the repository at this point in the history
  • Loading branch information
deep-sekhar committed Nov 5, 2022
1 parent a629381 commit 1992194
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Components/ShareProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import GetIcons from './Icons/GetIcons'
import PropTypes from 'prop-types'
import ShareIcon from './ShareIcon'
import { Toast } from 'primereact/toast'
import { useTheme } from '../ThemeContext'

export default function ShareProfile({ username }) {
const [show, setShow] = useState(false)
const toast = useRef(null)
const profileUrl = location.href
const darkTheme = useTheme()

const CopyLink = () => {
navigator.clipboard.writeText(profileUrl)
Expand All @@ -24,7 +26,10 @@ export default function ShareProfile({ username }) {
<Toast ref={toast} />

<div onClick={() => setShow(!show)}>
<GetIcons iconName="shareprofile" />
<GetIcons
className={`${darkTheme ? 'text-white' : 'text-gray-900'}`}
iconName="shareprofile"
/>
</div>

{show
Expand Down

0 comments on commit 1992194

Please sign in to comment.