import * as Dialog from '@radix-ui/react-dialog'; import { useState } from 'react'; import { useStorage } from '@libs/storage/provider'; import { ArrowRightCircleIcon, CancelIcon, CheckCircleIcon, GroupFeedsIcon, PlusIcon, } from '@shared/icons'; import { User } from '@shared/user'; import { WIDGET_KIND } from '@stores/constants'; import { useWidget } from '@utils/hooks/useWidget'; export function AddGroupFeeds({ currentWidgetId }: { currentWidgetId: string }) { const { db } = useStorage(); const { replaceWidget } = useWidget(); const [title, setTitle] = useState(''); const [users, setUsers] = useState>([]); // toggle follow state const toggleUser = (pubkey: string) => { const arr = users.includes(pubkey) ? users.filter((i) => i !== pubkey) : [...users, pubkey]; setUsers(arr); }; const submit = async () => { replaceWidget.mutate({ currentId: currentWidgetId, widget: { kind: WIDGET_KIND.group, title: title || 'Group', content: JSON.stringify(users), }, }); }; return (

Group feeds

Adding group feeds
setTitle(e.target.value)} placeholder="Nostrichs..." className="relative h-11 w-full rounded-lg bg-neutral-100 px-3 py-1 text-neutral-900 !outline-none placeholder:text-neutral-500 dark:bg-neutral-900 dark:text-neutral-100 dark:placeholder:text-neutral-300" />
Users
{db.account.circles.map((item: string) => ( ))}
); }