fix card component braking
This commit is contained in:
parent
60fb76f1c4
commit
6531d36fd5
1 changed files with 4 additions and 2 deletions
|
|
@ -38,8 +38,10 @@ export default function CollectionCardComponent({
|
||||||
const [loadingLike, setLoadingLike] = useState(false);
|
const [loadingLike, setLoadingLike] = useState(false);
|
||||||
const { setSuccessData, setErrorData } = useContext(alertContext);
|
const { setSuccessData, setErrorData } = useContext(alertContext);
|
||||||
const { setValidApiKey } = useContext(StoreContext);
|
const { setValidApiKey } = useContext(StoreContext);
|
||||||
const [liked_by_user, setLiked_by_user] = useState(data.liked_by_user);
|
const [liked_by_user, setLiked_by_user] = useState(
|
||||||
const [likes_count, setLikes_count] = useState(data.liked_by_count ?? 0);
|
data?.liked_by_user ?? false
|
||||||
|
);
|
||||||
|
const [likes_count, setLikes_count] = useState(data?.liked_by_count ?? 0);
|
||||||
|
|
||||||
const name = data.is_component ? "Component" : "Flow";
|
const name = data.is_component ? "Component" : "Flow";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue