Skip to content

Commit

Permalink
Merge pull request #338 from reactioncommerce/fix-287-jrw421-tag-updates
Browse files Browse the repository at this point in the history
Fix: Tags not rendering without manual refresh
  • Loading branch information
jrw421 authored Jan 29, 2021
2 parents 41607df + 828f90f commit 854c775
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useState } from "react";
import React, { useCallback, useEffect, useState } from "react";
import { i18next } from "/client/api";
import {
Card,
Expand Down Expand Up @@ -31,6 +31,11 @@ function ProductTagForm() {
handleDeleteProductTag({ tag });
}, [handleDeleteProductTag]);

useEffect(() => {
refetchProduct();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

if (product && Array.isArray(product.tags.nodes)) {
content = product.tags.nodes.map((tag) => (
<Box
Expand Down

0 comments on commit 854c775

Please sign in to comment.