1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 04:54:18 +00:00

🔧 Use loading in BoxRepositoryCreate

This commit is contained in:
Steffo 2021-05-17 15:58:24 +02:00
parent 5e3ef20785
commit 2b13ef41d6
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 5 additions and 2 deletions

View file

@ -19,7 +19,7 @@ import { useHistory } from "react-router"
* @returns {JSX.Element}
* @constructor
*/
export default function BoxRepositoryCreate({ ...props }) {
export default function BoxRepositoryCreate({ running, ...props }) {
const {
id,
evaluationMode,
@ -80,6 +80,7 @@ export default function BoxRepositoryCreate({ ...props }) {
icon={faBackward}
color={"Red"}
onClick={() => revert()}
disabled={running}
>
Annulla modifiche
</Button>
@ -88,6 +89,7 @@ export default function BoxRepositoryCreate({ ...props }) {
icon={faPencilAlt}
color={"Green"}
onClick={_ => goToOnSuccess(save, history, "/repositories")()}
disabled={running}
>
Salva modifiche
</Button>
@ -98,6 +100,7 @@ export default function BoxRepositoryCreate({ ...props }) {
icon={faPlus}
color={"Green"}
onClick={_ => goToOnSuccess(save, history, "/repositories")()}
disabled={running}
>
Crea repository
</Button>

View file

@ -147,7 +147,7 @@ export default function RepositoryEditor({
<BoxConditionUser className={Style.SearchByUser}/>
<BoxConditionDatetime className={Style.SearchByTimePeriod}/>
<BoxConditions className={Style.Conditions}/>
<BoxRepositoryCreate className={Style.CreateDialog}/>
<BoxRepositoryCreate running={loading} className={Style.CreateDialog}/>
</div>
</ContextRepositoryEditor.Provider>
)