Merge pull request #17073 from mozilla/FXA-9773

fix(storybook): Ensure stories are loading
This commit is contained in:
Valerie Pomerleau 2024-06-04 16:24:30 -07:00 коммит произвёл GitHub
Родитель bc175137e5 eaaa20d11f
Коммит 7798b2b631
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
15 изменённых файлов: 14 добавлений и 30 удалений

Просмотреть файл

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import React from 'react';
import { ReactComponent as CloseIcon } from '@fxa/shared/assets/images/close.svg';
import { Localized } from '@fluent/react';
import classNames from 'classnames';

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import { ReactNode } from 'react';
import React, { ReactNode } from 'react';
import { Localized } from '@fluent/react';
import classNames from 'classnames';
import { useClickOutsideEffect } from 'fxa-react/lib/hooks';

Просмотреть файл

@ -1,3 +1,4 @@
import React from 'react';
import { Profile } from '../../store/types';
import mozillaLogo from '@fxa/shared/assets/images/moz-logo-bw-rgb.svg';
import { useLocalization } from '@fluent/react';

Просмотреть файл

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import React from 'react';
import { Localized, useLocalization } from '@fluent/react';
import LinkExternal from '../LinkExternal';
import mozLogo from '@fxa/shared/assets/images/moz-logo-bw-rgb.svg';

Просмотреть файл

@ -1,26 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import React from 'react';
import { storiesOf } from '@storybook/react';
import Head from './index';
import AppLocalizationProvider from '../../lib/AppLocalizationProvider';
storiesOf('Components/Head', module)
.add('basic', () => (
<AppLocalizationProvider
baseDir="./locales"
userLocales={navigator.languages}
>
<Head />
</AppLocalizationProvider>
))
.add('with title', () => (
<AppLocalizationProvider
baseDir="./locales"
userLocales={navigator.languages}
>
<Head title="neat feature" />
</AppLocalizationProvider>
));

Просмотреть файл

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import React from 'react';
import { useLocalization } from '@fluent/react';
import { Helmet } from 'react-helmet';
import { determineLocale, determineDirection } from '@fxa/shared/l10n';

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import { ReactElement } from 'react';
import React, { ReactElement } from 'react';
import { Localized } from '@fluent/react';
import logo from '@fxa/shared/assets/images/moz-m-logo.svg';

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import { useConfig } from '../../models';
import { useMetrics } from '../../lib/metrics';
import { FtlMsg } from 'fxa-react/lib/utils';

Просмотреть файл

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import React from 'react';
import { useAccount, useAlertBar, useFtlMsgResolver } from '../../models';
import { pdf } from '@react-pdf/renderer';
import { saveAs } from 'file-saver';

Просмотреть файл

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import React from 'react';
import { ReactElement } from 'react';
import { FtlMsg } from 'fxa-react/lib/utils';
import { MozServices } from '../../lib/types';

Просмотреть файл

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import React from 'react';
import { useEscKeydownEffect, useChangeFocusEffect } from '../../../lib/hooks';
import { ReactComponent as CloseIcon } from '@fxa/shared/assets/images/close.svg';
import { alertContent, alertType, alertVisible } from '../../../models';

Просмотреть файл

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import React from 'react';
import { useState } from 'react';
import { useClickOutsideEffect } from 'fxa-react/lib/hooks';
import LinkExternal from 'fxa-react/components/LinkExternal';

Просмотреть файл

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import React from 'react';
import { LinkExternal } from 'fxa-react/components/LinkExternal';
import { DeviceLocation } from '../../../models/Account';
import { ReactComponent as WebIcon } from './web.svg';

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import { ReactNode } from 'react';
import React, { ReactNode } from 'react';
import { useClickOutsideEffect } from 'fxa-react/lib/hooks';
import { useEscKeydownEffect, useChangeFocusEffect } from '../../../lib/hooks';
import classNames from 'classnames';

Просмотреть файл

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import React from 'react';
import { Link, RouteComponentProps, useLocation } from '@reach/router';
import { useNavigateWithQuery as useNavigate } from '../../lib/hooks/useNavigateWithQuery';
import classNames from 'classnames';