mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-06 18:31:00 +00:00
Fix isNostrLinked condition for users with ephemeral privkey in local storage
This commit is contained in:
parent
8250c34e04
commit
d81f249757
@ -11,7 +11,10 @@ import { useSession } from 'next-auth/react';
|
|||||||
import MoreInfo from '@/components/MoreInfo';
|
import MoreInfo from '@/components/MoreInfo';
|
||||||
|
|
||||||
const LinkAccountsCard = ({ session }) => {
|
const LinkAccountsCard = ({ session }) => {
|
||||||
const isNostrLinked = session?.user?.pubkey && !session?.user?.privkey;
|
// nostr is linked if we have the pubkey but not the privkey in the session OR in local storage
|
||||||
|
const isNostrLinked = session?.user?.pubkey &&
|
||||||
|
(!session?.user?.privkey || session?.user?.privkey === '') &&
|
||||||
|
!localStorage.getItem('anonymousPrivkey');
|
||||||
const isGithubLinked = session?.account?.provider === 'github';
|
const isGithubLinked = session?.account?.provider === 'github';
|
||||||
const isEmailLinked = Boolean(session?.user?.email);
|
const isEmailLinked = Boolean(session?.user?.email);
|
||||||
const windowWidth = useWindowWidth();
|
const windowWidth = useWindowWidth();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user