Show save button only when modifications are made
This commit is contained in:
		@@ -186,6 +186,7 @@ export function MemberPage(p: {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  const cancel = async () => {
 | 
					  const cancel = async () => {
 | 
				
			||||||
    if (
 | 
					    if (
 | 
				
			||||||
 | 
					      changed &&
 | 
				
			||||||
      !(await confirm(
 | 
					      !(await confirm(
 | 
				
			||||||
        "Voulez-vous vraiment retirer les modifications apportées ? Celles-ci seront perdues !"
 | 
					        "Voulez-vous vraiment retirer les modifications apportées ? Celles-ci seront perdues !"
 | 
				
			||||||
      ))
 | 
					      ))
 | 
				
			||||||
@@ -240,9 +241,9 @@ export function MemberPage(p: {
 | 
				
			|||||||
          )}
 | 
					          )}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          {/* Save button */}
 | 
					          {/* Save button */}
 | 
				
			||||||
          {p.editing && (
 | 
					          {p.editing && changed && (
 | 
				
			||||||
            <Button
 | 
					            <Button
 | 
				
			||||||
              variant="contained"
 | 
					              variant={"contained"}
 | 
				
			||||||
              startIcon={<SaveIcon />}
 | 
					              startIcon={<SaveIcon />}
 | 
				
			||||||
              onClick={save}
 | 
					              onClick={save}
 | 
				
			||||||
              size="large"
 | 
					              size="large"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user