()
| 93 | export const DataGrid = RecordTable; |
| 94 | |
| 95 | function 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 | |
| 117 | export default function DataPoints() { |
| 118 | const loaderRecords = useLoaderData(); |
nothing calls this directly
no outgoing calls
no test coverage detected