mirror of
https://github.com/balzack/databag.git
synced 2025-04-21 17:15:16 +00:00
cludge to re-render topic when ready
This commit is contained in:
parent
98152def20
commit
84a8244e2b
@ -7,10 +7,19 @@ import { Logo } from 'logo/Logo';
|
||||
import { Space, Skeleton, Button, Modal, Input } from 'antd';
|
||||
import { ExclamationCircleOutlined, DeleteOutlined, EditOutlined, FireOutlined, PictureOutlined } from '@ant-design/icons';
|
||||
import { Carousel } from 'carousel/Carousel';
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export function TopicItem({ host, topic }) {
|
||||
|
||||
const { state, actions } = useTopicItem(topic);
|
||||
const [render, setRender] = useState(false);
|
||||
|
||||
// not sure why this helps, on mobile render updates not occuring without
|
||||
useEffect(() => {
|
||||
if (state.ready && state.confirmed) {
|
||||
setRender(true);
|
||||
}
|
||||
}, [state.ready, state.confirmed]);
|
||||
|
||||
let name = state.name ? state.name : state.handle;
|
||||
let nameClass = state.name ? 'set' : 'unset';
|
||||
|
Loading…
x
Reference in New Issue
Block a user