Replace Terms & Conditions with Sign Up Link on Sign In #4502 (#4617)

* Replace Terms & Conditions with Sign Up Link on Sign In #4502

* terms replaced with signup link

* begin fix (incomplete / do not merge)

* Revert

* Introduce welcome page

* Update Twenty website

---------

Co-authored-by: Mamatha Yarramaneni <mamathayarramaneni@Mamathas-Macbook.local>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
karthik
2024-03-22 17:40:01 -04:00
committed by GitHub
parent 3ea8589c0d
commit 0315f35979
17 changed files with 39 additions and 58 deletions

View File

@ -22,7 +22,7 @@ jest.mock('react-router-dom', () => {
const Wrapper = ({ children }: { children: React.ReactNode }) => (
<RecoilRoot>
<MemoryRouter
initialEntries={['/sign-in', '/verify', '/opportunities']}
initialEntries={['/welcome', '/verify', '/opportunities']}
initialIndex={2}
>
{children}
@ -44,7 +44,7 @@ describe('useApolloFactory', () => {
expect(res).toHaveProperty('query');
});
it('should navigate to /sign-in on unauthenticated error', async () => {
it('should navigate to /welcome on unauthenticated error', async () => {
const errors = [
{
extensions: {
@ -90,7 +90,7 @@ describe('useApolloFactory', () => {
expect((error as ApolloError).message).toBe('Error message not found.');
expect(mockNavigate).toHaveBeenCalled();
expect(mockNavigate).toHaveBeenCalledWith('/sign-in');
expect(mockNavigate).toHaveBeenCalledWith('/welcome');
}
});
});

View File

@ -41,12 +41,11 @@ export const useApolloFactory = () => {
setTokenPair(null);
if (
!isMatchingLocation(AppPath.Verify) &&
!isMatchingLocation(AppPath.SignIn) &&
!isMatchingLocation(AppPath.SignUp) &&
!isMatchingLocation(AppPath.SignInUp) &&
!isMatchingLocation(AppPath.Invite) &&
!isMatchingLocation(AppPath.ResetPassword)
) {
navigate(AppPath.SignIn);
navigate(AppPath.SignInUp);
}
},
extraLinks: [],