Fix CircleCI plugin (#1384)

* Fix disappearing CircleCI plugin

The paths for the CircleCI plugin were too deeply nested causing a blank
page to render when one visited /circleci.

* Set correct inputs from CircleCI settings

Typically, a value like `tokenFromStore` would be an empty string. The
code was setting `tokenFromStore` (rather than `token`) into the state
on every keystroke.

I don't know what potential effect this change has on storing tokens
because I haven't tested that feature yet. Hopefully it still works as
intended.

* Add Vim .swp files to .gitignore

Co-authored-by: David Tuite <dtuite@gmail.com>
This commit is contained in:
David Tuite
2020-06-21 20:10:53 +01:00
committed by GitHub
parent 8067f1b92a
commit b48d37c022
3 changed files with 8 additions and 8 deletions
+2 -5
View File
@@ -25,11 +25,8 @@ export const App = () => {
<AppStateProvider>
<>
<Routes>
<Route path="/circleci" element={<BuildsPage />} />
<Route
path="/circleci/build/:buildId"
element={<DetailedViewPage />}
/>
<Route path="*" element={<BuildsPage />} />
<Route path="/build/:buildId" element={<DetailedViewPage />} />
</Routes>
<Settings />
</>
@@ -44,13 +44,13 @@ const Settings = () => {
useEffect(() => {
if (tokenFromStore !== token) {
setToken(tokenFromStore);
setToken(token);
}
if (ownerFromStore !== owner) {
setOwner(ownerFromStore);
setOwner(owner);
}
if (repoFromStore !== repo) {
setRepo(repoFromStore);
setRepo(repo);
}
}, [ownerFromStore, repoFromStore, tokenFromStore, token, owner, repo]);