Skip to content
Snippets Groups Projects

Resolve "allow to have plugins without panel"

Merged Piotr Gawron requested to merge 306-allow-to-have-plugins-without-panel into development
4 files
+ 23
7
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -3,7 +3,7 @@ import { useAppDispatch } from '@/redux/hooks/useAppDispatch';
import { Button } from '@/shared/Button';
import { getSessionValid, logout, updateUser } from '@/redux/user/user.thunks';
import { closeModal } from '@/redux/modal/modal.slice';
import { closeModal, openSelectProjectModal } from '@/redux/modal/modal.slice';
import { userSelector } from '@/redux/user/user.selectors';
import { useAppSelector } from '@/redux/hooks/useAppSelector';
import { termsOfServiceValSelector } from '@/redux/configuration/configuration.selectors';
@@ -15,13 +15,14 @@ export const ToSModal: React.FC = () => {
const termsOfService = useAppSelector(termsOfServiceValSelector);
const updateUserTosHandler = async (): Promise<void> => {
// eslint-disable-next-line no-console
console.log('update');
if (userData) {
const user = { ...userData, termsOfUseConsent: true };
await dispatch(updateUser(user));
await dispatch(getSessionValid());
dispatch(closeModal());
if (userData.orcidId && userData.orcidId !== '') {
dispatch(openSelectProjectModal());
}
}
};
Loading