43 | {data.class === 'Channel' ?
:
}
44 |
45 | {isPending && (
46 |
47 |
48 |
49 | )}
50 |
51 | {isHovering && (
52 |
53 |
54 |
55 | )}
56 |
57 | )
58 | }
59 |
60 | export default BlocksListItem
61 |
--------------------------------------------------------------------------------
/src/components/ChannelCreator.tsx:
--------------------------------------------------------------------------------
1 | import { useArena } from '@/hooks/useArena'
2 | import getErrorMessage from '@/lib/getErrorMessage'
3 | import { PlusIcon } from '@heroicons/react/24/solid'
4 | import * as Popover from '@radix-ui/react-popover'
5 | import { ArenaChannelWithDetails, ChannelStatus } from 'arena-ts'
6 | import classNames from 'classnames'
7 | import { ChangeEvent, FormEvent, useState } from 'react'
8 | import { useDesktopActionsContext } from '../context/DesktopContext'
9 | import Spinner from './Spinner'
10 |
11 | interface FormDataType {
12 | name: '',
13 | privacy: ChannelStatus | ''
14 | }
15 |
16 | function ChannelCreator () {
17 | const { addChannelWindow } = useDesktopActionsContext()
18 | const arena = useArena()
19 |
20 | const [open, setOpen] = useState(false)
21 | const [isCreating, setIsCreating] = useState(false)
22 | const [formData, setFormData] = useState