Add post warnings to blog/mod #197

Merged
enes merged 3 commits from extra/154-blocked-warning into staging 2025-01-16 12:07:46 +00:00
Showing only changes of commit 8c10a467be - Show all commits

View File

@ -3,7 +3,7 @@ import {
launch as launchNostrLoginDialog launch as launchNostrLoginDialog
} from 'nostr-login' } from 'nostr-login'
import React, { useEffect, useState } from 'react' import React, { useEffect, useState } from 'react'
import { Link } from 'react-router-dom' import { Link, useRevalidator } from 'react-router-dom'
import { Banner } from '../components/Banner' import { Banner } from '../components/Banner'
import { ZapPopUp } from '../components/Zap' import { ZapPopUp } from '../components/Zap'
import { import {
@ -27,7 +27,7 @@ export const Header = () => {
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const { findMetadata } = useNDKContext() const { findMetadata } = useNDKContext()
const userState = useAppSelector((state) => state.user) const userState = useAppSelector((state) => state.user)
const revalidator = useRevalidator()
// Track nostr-login extension modal open state // Track nostr-login extension modal open state
const [isOpen, setIsOpen] = useState(false) const [isOpen, setIsOpen] = useState(false)
const handleOpen = () => setIsOpen(true) const handleOpen = () => setIsOpen(true)
@ -75,8 +75,12 @@ export const Header = () => {
} }
}) })
} }
// React router - revalidate loader states on auth changes
revalidator.revalidate()
} }
}) })
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [dispatch, findMetadata]) }, [dispatch, findMetadata])
const handleLogin = () => { const handleLogin = () => {
@ -447,7 +451,9 @@ const RegisterButtonWithDialog = () => {
color: '#ffffffbf' color: '#ffffffbf'
}} }}
> >
Warning: Make sure you backup your private key somewhere safe. If you lose it or it gets leaked, we actually can't help you. Warning: Make sure you backup your private key
somewhere safe. If you lose it or it gets leaked, we
actually can't help you.
</p> </p>
<p <p
className='labelDescriptionMain' className='labelDescriptionMain'