Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Show option only if there is something to revert

Manav Rathi6b0578244698
diff --git a/web/packages/new/photos/components/gallery/PeopleHeader.tsx b/web/packages/new/photos/components/gallery/PeopleHeader.tsx
index e973e1396d..809da0aef3 100644
--- a/web/packages/new/photos/components/gallery/PeopleHeader.tsx
+++ b/web/packages/new/photos/components/gallery/PeopleHeader.tsx
@@ -463,21 +463,23 @@ const SuggestionsDialog: React.FC<SuggestionsDialogProps> = ({
{person.name ?? " "}
</Typography>
</Stack>
- <IconButton
- onClick={() => dispatch({ type: "toggleHistory" })}
- aria-label={
- !state.showChoices
- ? pt("Saved suggestions")
- : pt("Review suggestions")
- }
- sx={{
- backgroundColor: state.showChoices
- ? (theme) => theme.colors.fill.muted
- : "transparent",
- }}
- >
- <RestoreIcon />
- </IconButton>
+ {state.choices.length > 1 && (
+ <IconButton
+ onClick={() => dispatch({ type: "toggleHistory" })}
+ aria-label={
+ !state.showChoices
+ ? pt("Saved suggestions")
+ : pt("Review suggestions")
+ }
+ sx={{
+ backgroundColor: state.showChoices
+ ? (theme) => theme.colors.fill.muted
+ : "transparent",
+ }}
+ >
+ <RestoreIcon />
+ </IconButton>
+ )}
</SpaceBetweenFlex>
<DialogContent sx={{ display: "flex", "&&&": { pt: 0 } }}>
{state.activity == "fetching" ? (