Skip to content

Commit

Permalink
fix(frontend): back buttons (#3094)
Browse files Browse the repository at this point in the history
# Description

Please include a summary of the changes and the related issue. Please
also include relevant motivation and context.

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):
  • Loading branch information
Zewed authored Aug 26, 2024
1 parent c95fc3a commit d7c841b
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const FromConnections = (): JSX.Element => {
setCurrentSyncElements,
currentSyncId,
loadingFirstList,
setCurrentSyncId,
} = useFromConnectionsContext();
const [currentFiles, setCurrentFiles] = useState<SyncElement[]>([]);
const [currentFolders, setCurrentFolders] = useState<SyncElement[]>([]);
Expand Down Expand Up @@ -85,10 +86,14 @@ export const FromConnections = (): JSX.Element => {
iconName="chevronLeft"
color="black"
onClick={() => {
void handleBackClick();
if (folderStack.length) {
void handleBackClick();
} else {
setCurrentSyncId(undefined);
}
}}
small={true}
disabled={!folderStack.length}
disabled={loading || loadingFirstList}
/>
</div>
<div className={styles.connection_content}>
Expand Down

0 comments on commit d7c841b

Please sign in to comment.