Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 03c1e7d

Browse files
author
Noah Lee
authored
feat: Add refresh button for deploy (#531)
1 parent c197aaf commit 03c1e7d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Diff for: ui/src/views/repoDeploy/index.tsx

+12-2
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,17 @@ function RepoDeploy({
228228
env,
229229
onClickOk,
230230
}: RepoDeployProps): JSX.Element {
231+
const [refreshing, setRefreshing] = useState(false);
231232
const [payloadModalVisible, setPayloadModalVisible] = useState(false);
232233

234+
const _onClickRefresh = () => {
235+
setRefreshing(true);
236+
onClickRefresh();
237+
setTimeout(() => {
238+
setRefreshing(false);
239+
}, 1000);
240+
};
241+
233242
const _onClickDeploy = () => {
234243
if (env?.dynamicPayload?.enabled) {
235244
setPayloadModalVisible(true);
@@ -257,9 +266,10 @@ function RepoDeploy({
257266
key="1"
258267
type="text"
259268
shape="circle"
260-
size="large"
269+
size="middle"
270+
loading={refreshing}
261271
icon={<RedoOutlined />}
262-
onClick={onClickRefresh}
272+
onClick={_onClickRefresh}
263273
/>,
264274
]}
265275
/>

0 commit comments

Comments
 (0)