MCPcopy Create free account
hub / github.com/OpenSIST/OpenSIST.github.io / RefreshButton

Function RefreshButton

src/Components/DataPoints/DataPoints.jsx:95–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93export const DataGrid = RecordTable;
94
95function RefreshButton() {
96 const submit = useSubmit();
97 const navigation = useNavigation();
98 const busy = navigation.state !== "idle";
99 return (
100 <Button
101 disableRipple
102 className="rt-pill rt-group-pill"
103 onClick={() => submit(null, {method: "post"})}
104 startIcon={
105 <Refresh sx={{
106 fontSize: 16,
107 "@keyframes rtspin": {to: {transform: "rotate(360deg)"}},
108 animation: busy ? "rtspin 0.8s linear infinite" : "none",
109 }}/>
110 }
111 >
112 刷新
113 </Button>
114 );
115}
116
117export default function DataPoints() {
118 const loaderRecords = useLoaderData();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected