add close button in modals & add app details page

This commit is contained in:
Bekbolsun
2024-01-29 21:10:11 +06:00
parent 5fa22a2d9e
commit 3fa6e1cdaa
32 changed files with 474 additions and 75 deletions

View File

@@ -1,10 +1,12 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import { SectionTitle } from '../../shared/SectionTitle/SectionTitle'
import { useAppSelector } from '../../store/hooks/redux'
import { askNotificationPermission, getShortenNpub } from '../../utils/helpers'
import {
askNotificationPermission,
getShortenNpub,
} from '../../utils/helpers/helpers'
import { useParams } from 'react-router-dom'
import { fetchProfile } from '../../modules/nostr'
import { nip19 } from 'nostr-tools'
import { Badge, Box, CircularProgress, Stack } from '@mui/material'
import { StyledIconButton } from './styled'
import { SettingsIcon, ShareIcon } from '@/assets'
@@ -52,7 +54,10 @@ const KeyPage = () => {
const notify = useEnqueueSnackbar()
const [profile, setProfile] = useState<MetaEvent | null>(null)
const userName = profile?.info?.name || profile?.info?.display_name || getShortenNpub(npub)
const userName =
profile?.info?.name ||
profile?.info?.display_name ||
getShortenNpub(npub)
const userNameWithPrefix = userName + '@nsec.app'
const [showWarning, setShowWarning] = useState(false)