From 910bf7b1c1e58c1b8dbe2ae7aeb362af5788a932 Mon Sep 17 00:00:00 2001
From: Fin Reinhard <fin.reinhard@icloud.com>
Date: Tue, 22 Jan 2019 21:27:32 +0000
Subject: [PATCH] added some comments
---
borgbutler-webapp/src/components/views/archives/FileListPanel.jsx | 1 +
borgbutler-webapp/src/components/views/archives/BreadcrumbPath.jsx | 7 ++-----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/borgbutler-webapp/src/components/views/archives/BreadcrumbPath.jsx b/borgbutler-webapp/src/components/views/archives/BreadcrumbPath.jsx
index 46872ac..e7d1842 100644
--- a/borgbutler-webapp/src/components/views/archives/BreadcrumbPath.jsx
+++ b/borgbutler-webapp/src/components/views/archives/BreadcrumbPath.jsx
@@ -2,6 +2,8 @@
import {Link, Route} from 'react-router-dom';
import {BreadcrumbItem} from 'reactstrap';
+// Attention: Recursive Call
+// https://reacttraining.com/react-router/web/example/recursive-paths
function BreadcrumbPath({match}) {
return (
<React.Fragment>
@@ -13,11 +15,6 @@
<Route
path={`${match.url}/:path`}
component={BreadcrumbPath}
- /*
- render={props =>
- <BreadcrumbPath {...props} match={match} changeCurrentDirectory={changeCurrentDirectory} />
- }
- */
/>
</React.Fragment>
)
diff --git a/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx b/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
index e6cd10f..d3a0f11 100644
--- a/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
+++ b/borgbutler-webapp/src/components/views/archives/FileListPanel.jsx
@@ -40,6 +40,7 @@
}
handleURLChange = location => {
+ // Replacing matched URL(archiveId, repoId) and removing trailing slashes
this.changeCurrentDirectory(location.pathname.replace(this.props.match.url, '').replace(/^\/|\/$/g, ''));
};
--
Gitblit v1.10.0