Skip to content

Commit

Permalink
bugfix/refetch-token-issue (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJJackson authored Jul 11, 2024
1 parent b5ea877 commit dbea288
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 30 deletions.
2 changes: 1 addition & 1 deletion src/app-bundles/domains-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default createRestBundle({
postTemplate: '/domains',
deleteTemplate: '/domains/{:item.id}',
fetchActions: ['URL_UPDATED'],
forceFetchActions: ['EXPLOREMAP_INITIALIZE_START'],
forceFetchActions: ['@@INIT'],
addons: {
selectDomainsItemsByGroup: createSelector('selectDomainsItems', (items) => {
if (!items) return null;
Expand Down
25 changes: 1 addition & 24 deletions src/app-bundles/profile-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default createRestBundle({
postTemplate: '/profiles',
deleteTemplate: '',
fetchActions: ['URL_UPDATED'],
forceFetchActions: ['PROFILE_SAVE_FINISHED'],
forceFetchActions: ['PROFILE_SAVE_FINISHED', '@@INIT'],
reduceFurther: (state, { type, payload }) => {
switch (type) {
case 'PROFILE_REMOVE_PROFILE':
Expand All @@ -24,18 +24,6 @@ export default createRestBundle({
}
},
addons: {
doFetchUserProfile: () => ({ apiGet }) => {
const url = `/my_profile`;

apiGet(url, (err, _body) => {
if (err) {
// eslint-disable-next-line no-console
console.log('error: ', err);
// } else {
// dispatch({ type: 'UPDATE_DISTRICT_DATA', payload: body });
}
});
},
doRemoveProfile: () => ({ dispatch, store }) => {
dispatch({
type: 'PROFILE_REMOVE_PROFILE',
Expand Down Expand Up @@ -96,16 +84,5 @@ export default createRestBundle({
}
}
),
// reactProfileCreatedRedirect: createSelector(
// 'selectProfileActive',
// 'selectRelativePathname',
// (profile, path) => {
// if (profile || !isLoggedIn())
// return {
// actionCreator: 'doUpdateRelativeUrl',
// args: ['/'],
// };
// }
// ),
},
});
7 changes: 3 additions & 4 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ const root = createRoot(container);
const queryClient = new QueryClient();

cache.getAll().then((initialData) => {
const store = getStore(initialData);

if (import.meta.env.DEV) window.store = store;

const renderApp = () => {
const store = getStore(initialData);
if (import.meta.env.DEV) window.store = store;

root.render(
<Provider store={store}>
<QueryClientProvider client={queryClient}>
Expand Down
1 change: 0 additions & 1 deletion src/userService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const initKeycloak = (renderAppCallback = () => {}) => {
window.location.origin + '/silent-check-sso.html',
pkceMethod: 'S256',
adapter: 'default',
checkLoginIframe: false,
})
.then(() => {
renderAppCallback();
Expand Down

0 comments on commit dbea288

Please sign in to comment.