import { DbApp } from '@/modules/db' import { AppLink } from '@/shared/AppLink/AppLink' import { SectionTitle } from '@/shared/SectionTitle/SectionTitle' import { Box, Stack, Typography } from '@mui/material' import { FC } from 'react' import { StyledEmptyAppsBox } from '../styled' import { Button } from '@/shared/Button/Button' import { call } from '@/utils/helpers/helpers' import { swicCall } from '@/modules/swic' import { useEnqueueSnackbar } from '@/hooks/useEnqueueSnackbar' import { ItemApp } from './ItemApp' type AppsProps = { apps: DbApp[] npub: string } export const Apps: FC = ({ apps = [] }) => { const notify = useEnqueueSnackbar() // eslint-disable-next-line async function deletePerm(id: string) { call(async () => { await swicCall('deletePerm', id) notify('Perm deleted!', 'success') }) } const openAppStore = () => { window.open('https://nostrapp.link', '_blank') } return ( Connected apps {!apps.length && ( No connected apps )} {apps.map((a) => ( ))} ) }