Explorar o código

add reload button

visuddhinanda %!s(int64=3) %!d(string=hai) anos
pai
achega
d7bcd4c85b
Modificáronse 1 ficheiros con 11 adicións e 1 borrados
  1. 11 1
      dashboard/src/components/template/SentEdit/SentCanRead.tsx

+ 11 - 1
dashboard/src/components/template/SentEdit/SentCanRead.tsx

@@ -1,5 +1,6 @@
-import { message } from "antd";
+import { Button, message } from "antd";
 import { useEffect, useState } from "react";
 import { useEffect, useState } from "react";
+import { ReloadOutlined } from "@ant-design/icons";
 
 
 import { get } from "../../../request";
 import { get } from "../../../request";
 import { TChannelType } from "../../api/Channel";
 import { TChannelType } from "../../api/Channel";
@@ -70,6 +71,15 @@ const Widget = ({
   }, [reload]);
   }, [reload]);
   return (
   return (
     <>
     <>
+      <div style={{ display: "flex", justifyContent: "space-between" }}>
+        <span></span>
+        <Button
+          type="link"
+          shape="round"
+          icon={<ReloadOutlined />}
+          onClick={() => load()}
+        />
+      </div>
       {sentData.map((item, id) => {
       {sentData.map((item, id) => {
         return <SentCell data={item} key={id} isPr={true} />;
         return <SentCell data={item} key={id} isPr={true} />;
       })}
       })}