Skip to content

Commit 4356d8f

Browse files
committed
refactor: delete old Account Provider
1 parent a7dc537 commit 4356d8f

File tree

7 files changed

+6
-140
lines changed

7 files changed

+6
-140
lines changed

src/app/components/Account/AccountContext.tsx

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/app/components/Account/AccountHeader/index.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ThemeProvider from '#app/components/ThemeProvider';
22
import { ServiceContextProvider } from '#app/contexts/ServiceContext';
3-
import { AccountContext } from '../AccountContext';
3+
import { AccountContext } from '#app/contexts/AccountContext';
44
import AccountHeader from '.';
55

66
const withProviders =
@@ -12,9 +12,9 @@ const withProviders =
1212
value={{
1313
isSignedIn,
1414
signInUrl: 'https://example.com/signin',
15-
accountUrl: 'https://example.com/for-you',
15+
forYouUrl: 'https://example.com/for-you',
1616
registerUrl: 'https://example.com/register',
17-
isSignInAvailable: true,
17+
idIdctaAvailable: true,
1818
}}
1919
>
2020
<AccountHeader />

src/app/components/Account/AccountHeader/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { useContext } from 'react';
2-
import { AccountContext } from '../AccountContext';
2+
import { AccountContext } from '#contexts/AccountContext';
33
import styles from './index.styles';
44

55
const AccountHeader = () => {
6-
const { isSignedIn, signInUrl, accountUrl } = useContext(AccountContext);
6+
const { isSignedIn, signInUrl, forYouUrl } = useContext(AccountContext);
77

8-
const href = isSignedIn ? accountUrl : signInUrl;
8+
const href = isSignedIn ? forYouUrl : signInUrl;
99
if (!href) return null;
1010

1111
return (

src/app/components/Account/idcta/appendCtaQueryParams.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/app/components/Account/idcta/fetchIdctaConfig.ts

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/app/components/Account/idcta/getIdctaBaseUrl.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/app/components/Account/idcta/isSignedIn.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)