-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(container): added an invitation modal to accept contract #14041
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we not do a separated PR for the common changes ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They will disappear once their dedicated PR will be merged (#14025)
const { data } = await fetchIcebergV2<IamResource>({ | ||
route: '/iam/resource?resourceType=account', | ||
}); | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a note to say why it s commented
const { t } = useTranslation('agreements-update-modal'); | ||
const { data: urn } = useAccountUrn({ enabled: region !== 'US' && current === ModalTypes.agreements && window.location.href !== myContractsLink }); | ||
const { isAuthorized: canUserAcceptAgreements } = useAuthorizationIam(['account:apiovh:me/agreements/accept'], urn); | ||
const { data: agreements, isLoading } = useAgreementsUpdate({ enabled: canUserAcceptAgreements }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isloading is not used
@@ -22,6 +25,7 @@ export default function Container(): JSX.Element { | |||
chatbotReduced, | |||
setChatbotReduced, | |||
} = useContainer(); | |||
useModals(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess it is on oversight ?
bd620ea
18c993f
Quality Gate failedFailed conditions |
The base branch was changed.
ref: MANAGER-14722 Signed-off-by: Jacques Larique <[email protected]>
ref: MANAGER-14722 Signed-off-by: Jacques Larique <[email protected]>
ref: MANAGER-14722 Signed-off-by: Jacques Larique <[email protected]>
ref: MANAGER-14722 Signed-off-by: Jacques Larique <[email protected]>
ref: MANAGER-14722 Signed-off-by: Jacques Larique <[email protected]>
ref: MANAGER-14722 Signed-off-by: Jacques Larique <[email protected]>
ref: MANAGER-14722 Signed-off-by: Jacques Larique <[email protected]>
ref: MANAGER-14722 Signed-off-by: Jacques Larique <[email protected]>
Quality Gate failedFailed conditions |
import { useContext } from 'react'; | ||
import ModalsContext from '@/context/modals/modals.context'; | ||
|
||
const useModals = () => useContext(ModalsContext); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A custom hook should imho check if the hook is used inside the provider and otherwise throw an error. Sth like:
import { useContext } from 'react';
import ModalsContext from '@/context/modals/modals.context';
const useModals = () => {
const context = useContext(ModalsContext);
if (!context) throw new Error('useModals must be inside ModalsProvider');
return context;
}
export default useModals;
master
Breaking change is mentioned in relevant commits(n/a)Description
Reworked modal display in order to avoid the possibility of having multiple modals displayed at the same time
Set up a new modal to invite customer to accept new / updated contracts
Fix a small tracking issue on KYC India modal
Related