In the code snippet given, I have a problem that the if (descriptionValue) condition does not wait for setDescriptionValue(content). How to fix this problem? (Condition if (props.isOfferFilter) met)
const onClickHandler: () => Promise<void> = async () => {
if (props.isOfferFilter) {
content = getInnerHtml(id);
setDescriptionValue(content);
}
if (nameValue && descriptionValue && catValue && projectIdValue) {