import { init as initNostrLogin, launch as launchNostrLoginDialog } from 'nostr-login' import React, { useEffect, useState } from 'react' import { Link } from 'react-router-dom' import { Banner } from '../components/Banner' import { ZapPopUp } from '../components/Zap' import { MetadataController } from '../controllers' import { useAppDispatch, useAppSelector, useDidMount } from '../hooks' import { appRoutes } from '../routes' import { setAuth, setUser } from '../store/reducers/user' import mainStyles from '../styles//main.module.scss' import navStyles from '../styles/nav.module.scss' import '../styles/popup.css' import { npubToHex } from '../utils' export const Header = () => { const dispatch = useAppDispatch() const userState = useAppSelector((state) => state.user) useEffect(() => { initNostrLogin({ darkMode: true, noBanner: true, methods: ['extension'], onAuth: (npub, opts) => { if (opts.type === 'logout') { dispatch(setAuth(null)) dispatch(setUser(null)) } else { dispatch( setAuth({ method: opts.method, localNsec: opts.localNsec }) ) dispatch( setUser({ npub, pubkey: npubToHex(npub)! }) ) MetadataController.getInstance().then((metadataController) => { metadataController.findMetadata(npub).then((userProfile) => { if (userProfile) { dispatch( setUser({ npub, pubkey: npubToHex(npub)!, ...userProfile }) ) } }) }) } } }) }, [dispatch]) const handleLogin = () => { launchNostrLoginDialog() } return (
If you don't want the development and maintenance of DEG Mods to stop, then a tip helps!
} lastNode={
DEG Mod's Silent Payment Bitcoin Address (Be careful.{' '}
Learn more
):
sp1qq205tj23sq3z6qjxt5ts5ps8gdwcrkwypej3h2z2hdclmaptl25xxqjfqhc2de4gaxprgm0yqwfr737swpvvmrph9ctkeyk60knz6xpjhqumafrd
Once you create your "account" on any of these ( Here's a quick video guide ), come back and click login, then sign-in with extension.
Q: Why can't I create an account normally?
A: DEG Mods can't ban you or delete your content (we can
only hide you), and the consequence of that is this kind of
registration/login system.
or
Once you create your "account" on any of these, come back and click login, then sign-in with extension.