Browse Source

value.contentType === "json"

visuddhinanda 2 năm trước cách đây
mục cha
commit
fe61f705a3

+ 2 - 1
dashboard/src/components/template/SentEdit.tsx

@@ -113,9 +113,10 @@ export const SentEditInner = ({
       setLoadedRes(res);
     }
   }, [translation]);
+
   useEffect(() => {
     const content = origin?.find(
-      (value) => value.channel.type === "wbw"
+      (value) => value.contentType === "json"
     )?.content;
     if (content) {
       setWbwData(JSON.parse(content));

+ 1 - 1
dashboard/src/components/template/SentEdit/SentContent.tsx

@@ -121,7 +121,7 @@ const SentContentWidget = ({
       />
       <div style={{ flex: layoutFlex.left, color: "#9f3a01" }}>
         {origin?.map((item, id) => {
-          if (item.channel.type === "wbw") {
+          if (item.contentType === "json") {
             return (
               <WbwSentCtl
                 key={id}