1
0
Fork 1
mirror of https://github.com/SomboChea/ui synced 2024-06-01 09:05:06 +07:00
verdaccio-ui/src/App
coolsp 222ffed022 fix: package list refresh based on logged-in user (#415)
* fix: package list refresh based on logged-in user

description:
In `pages/home/Home.tsx` now monitoring any change in a user log-in/out which will trigger a new `API.request` to get the _packages_ from the Verdaccio-server.  This is done by creating a `useEffect` on **isUserLoggedIn**.  Code has been transplanted from `App/App.tsx` including the use of the Loading component during the XHR.  The use of **packages** was removed from other components as no longer needed and tests updated.

Resolves issue #414

* fix: package list refresh based on logged-in user

description:
In `pages/home/Home.tsx` now monitoring any change in a user log-in/out which will trigger a new `API.request` to get the _packages_ from the Verdaccio-server. This is done by creating a `useEffect` on **isUserLoggedIn**. Code has been transplanted from `App/App.tsx` including the use of the Loading component during the XHR. The use of **packages** was removed from other components as no longer needed and tests updated.
Test snapshots updated

Resolves issue #414

Co-authored-by: Juan Picado @jotadeveloper <juanpicado19@gmail.com>
2020-01-12 22:21:29 +01:00
..
__snapshots__ fix: package list refresh based on logged-in user (#415) 2020-01-12 22:21:29 +01:00
App.test.tsx Refactor(#209): Converted App component from class to func 2019-11-24 19:21:08 +01:00
App.tsx fix: package list refresh based on logged-in user (#415) 2020-01-12 22:21:29 +01:00
AppContext.ts fix: package list refresh based on logged-in user (#415) 2020-01-12 22:21:29 +01:00
AppContextProvider.tsx fix: package list refresh based on logged-in user (#415) 2020-01-12 22:21:29 +01:00
AppError.tsx fix: improved typing (#174) 2019-10-10 22:20:05 +02:00
AppRoute.tsx fix: package list refresh based on logged-in user (#415) 2020-01-12 22:21:29 +01:00
index.ts Refactor(#209): Converted App component from class to func 2019-11-24 19:21:08 +01:00