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:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user