This commit is contained in:
Jesús Espino 2021-04-14 09:44:31 +02:00
parent 71205233de
commit e96bf126be

View file

@ -29,6 +29,7 @@ type Props = {
const CardDetail = (props: Props): JSX.Element|null => {
const {cardTree} = props
const {card, comments} = cardTree
const [title, setTitle] = useState(cardTree.card.title)
const titleRef = useRef<{focus(selectAll?: boolean): void}>(null)
const titleValueRef = useRef(title)
@ -46,14 +47,12 @@ const CardDetail = (props: Props): JSX.Element|null => {
mutator.changeTitle(card, titleValueRef.current)
}
}
}, [])
}, [cardTree])
if (!cardTree) {
return null
}
const {card, comments} = cardTree
// componentWillUnmount(): void {
// }