mirror of
https://github.com/lumehq/lume.git
synced 2025-04-06 02:48:36 +02:00
fix duplicate channel list item
This commit is contained in:
parent
e695676bbf
commit
d5dd049f43
@ -48,8 +48,6 @@ export const CreateChannelModal = () => {
|
||||
|
||||
// publish channel
|
||||
pool.publish(event, MESSAGE_RELAYS);
|
||||
// insert to database
|
||||
createChannel(event.id, event.content, event.created_at);
|
||||
// update jotai state
|
||||
setChannel((prev: any) => [
|
||||
...prev,
|
||||
@ -62,6 +60,8 @@ export const CreateChannelModal = () => {
|
||||
// reset form
|
||||
reset();
|
||||
setTimeout(() => {
|
||||
// insert to database
|
||||
createChannel(event.id, event.content, event.created_at);
|
||||
// close modal
|
||||
setOpen(false);
|
||||
// redirect to channel page
|
||||
|
Loading…
x
Reference in New Issue
Block a user