From 898a0938e53f8bf337aa0606a2665677b9f3c64b Mon Sep 17 00:00:00 2001 From: Nathan Arthur Date: Fri, 21 Apr 2023 14:38:00 -0400 Subject: [PATCH] allow eslint --fix to sort and group all imports --- .eslintrc.js | 13 +- .graphqlrc.yml | 2 +- __mocks__/next/router.ts | 3 +- graphql-plugin-getters.js | 2 +- jest.config.strict.ts | 3 +- jest.config.ts | 2 +- package-lock.json | 121 +++++++++++------- package.json | 6 +- ...TvL.js => worker-nkFu_-PkopJY0W7W9dQCn.js} | 0 public/worker-ymWX0Gy9LQDCSp4OnpJ6y.js | 1 - .../HOCs/__generated__/withAuthGuard.ts | 4 +- src/components/HOCs/withAuthGuard.spec.tsx | 9 +- src/components/HOCs/withAuthGuard.tsx | 7 +- src/components/HOCs/withFailStates.spec.tsx | 2 +- src/components/HOCs/withFailStates.tsx | 4 +- src/components/HOCs/withIntl.tsx | 6 +- src/components/atoms/horizontalRule.tsx | 2 +- src/components/atoms/lineHeading.tsx | 2 +- .../molecules/__generated__/helpWidget.ts | 4 +- .../molecules/__generated__/login.ts | 4 +- .../molecules/bibleVersionTypeLockup.tsx | 3 +- src/components/molecules/buttonBack.tsx | 2 +- src/components/molecules/buttonDownload.tsx | 10 +- src/components/molecules/buttonFavorite.tsx | 5 +- src/components/molecules/buttonGuest.tsx | 9 +- src/components/molecules/buttonNudge.tsx | 12 +- src/components/molecules/buttonPlay.tsx | 8 +- src/components/molecules/buttonPlayback.tsx | 14 +- src/components/molecules/buttonShare.tsx | 7 +- .../molecules/buttonShareRecording.tsx | 6 +- src/components/molecules/buttonSpeed.tsx | 7 +- .../molecules/card/audiobookTrack.tsx | 3 +- .../molecules/card/base/withTheme.tsx | 1 - src/components/molecules/card/bibleBook.tsx | 14 +- .../molecules/card/bibleChapter.tsx | 3 +- .../molecules/card/bibleVersion.tsx | 16 +-- src/components/molecules/card/collection.tsx | 27 ++-- src/components/molecules/card/favorite.tsx | 2 +- .../molecules/card/favoriteEntity.tsx | 4 +- .../molecules/card/hat/audiobook.tsx | 12 +- .../molecules/card/hat/bibleBook.tsx | 8 +- src/components/molecules/card/hat/index.tsx | 6 +- src/components/molecules/card/hat/sermon.tsx | 10 +- src/components/molecules/card/hat/song.tsx | 5 +- src/components/molecules/card/hat/sponsor.tsx | 14 +- src/components/molecules/card/hat/story.tsx | 10 +- src/components/molecules/card/index.tsx | 2 +- src/components/molecules/card/inferred.tsx | 14 +- src/components/molecules/card/person.tsx | 15 +-- src/components/molecules/card/playlist.tsx | 14 +- .../molecules/card/playlistItem.tsx | 3 +- src/components/molecules/card/post.spec.tsx | 4 +- src/components/molecules/card/post.tsx | 16 +-- src/components/molecules/card/recording.tsx | 6 +- .../molecules/card/recordingSequenceHat.tsx | 9 +- .../molecules/card/recordingStack.tsx | 6 +- src/components/molecules/card/sequence.tsx | 23 ++-- src/components/molecules/card/sermon.spec.tsx | 6 +- src/components/molecules/card/sermon.tsx | 3 +- src/components/molecules/card/song.tsx | 3 +- src/components/molecules/card/songBook.tsx | 15 +-- src/components/molecules/card/sponsor.tsx | 15 +-- src/components/molecules/card/story.tsx | 3 +- src/components/molecules/card/topic.tsx | 3 +- src/components/molecules/cardGroup.tsx | 2 +- src/components/molecules/cardMasonry.tsx | 2 +- src/components/molecules/circleButton.tsx | 2 +- .../molecules/collectionTypeLockup.tsx | 5 +- src/components/molecules/copyrightInfo.tsx | 5 +- src/components/molecules/definitionList.tsx | 5 +- .../molecules/downloadAppButton.tsx | 1 - src/components/molecules/helpWidget.spec.tsx | 10 +- src/components/molecules/helpWidget.tsx | 7 +- src/components/molecules/iconButton.tsx | 3 +- .../molecules/languageAlternativesAlert.tsx | 8 +- src/components/molecules/languageButton.tsx | 12 +- .../molecules/loadingIndicator.spec.tsx | 8 +- src/components/molecules/loadingIndicator.tsx | 2 +- src/components/molecules/login.spec.tsx | 8 +- src/components/molecules/login.tsx | 6 +- src/components/molecules/loginForm.tsx | 8 +- .../molecules/mediaFormatSwitcher.tsx | 6 +- src/components/molecules/namedAvatar.tsx | 5 +- src/components/molecules/navItem.tsx | 6 +- src/components/molecules/pagination.spec.tsx | 2 +- src/components/molecules/pagination.tsx | 3 +- src/components/molecules/personLockup.tsx | 2 +- src/components/molecules/personTypeLockup.tsx | 3 +- src/components/molecules/playbackTimes.tsx | 6 +- src/components/molecules/player.spec.tsx | 22 ++-- src/components/molecules/player.tsx | 28 ++-- .../recordingButtonFavorite.spec.tsx | 20 +-- .../molecules/recordingButtonFavorite.tsx | 6 +- .../molecules/recordingHasVideoFilter.tsx | 7 +- .../molecules/recordingProgressBar.tsx | 4 +- src/components/molecules/searchBar.tsx | 10 +- src/components/molecules/sequenceNav.tsx | 3 +- .../molecules/sequenceTypeLockup.tsx | 4 +- src/components/molecules/socialLogin.spec.tsx | 9 +- src/components/molecules/socialLogin.tsx | 20 +-- src/components/molecules/sponsorLockup.tsx | 2 +- .../molecules/sponsorTypeLockup.tsx | 3 +- src/components/molecules/tease.tsx | 2 +- src/components/molecules/teaseRecording.tsx | 23 ++-- .../molecules/teaseRecordingStack.tsx | 4 +- src/components/molecules/transcript.tsx | 4 +- src/components/molecules/typeLockup.tsx | 5 +- .../organisms/__generated__/notFound.ts | 4 +- .../organisms/__generated__/searchResults.ts | 4 +- src/components/organisms/aboutNav.tsx | 4 +- src/components/organisms/accountNav.tsx | 6 +- src/components/organisms/drawer.tsx | 6 +- src/components/organisms/emptyState.tsx | 10 +- src/components/organisms/footer.tsx | 13 +- src/components/organisms/header.spec.tsx | 6 +- src/components/organisms/header.tsx | 2 +- src/components/organisms/libraryNav.tsx | 15 +-- src/components/organisms/miniplayer.tsx | 21 ++- src/components/organisms/mobileHeader.tsx | 24 ++-- .../mobileHeader.useTransitionProgress.ts | 3 +- src/components/organisms/modal.tsx | 7 +- src/components/organisms/modalLoginForm.tsx | 4 +- .../organisms/modalRegisterForm.tsx | 2 +- src/components/organisms/navigation.spec.tsx | 6 +- src/components/organisms/navigation.tsx | 29 ++--- src/components/organisms/notFound.tsx | 19 ++- .../organisms/paginatedCardList.tsx | 10 +- src/components/organisms/recording.tsx | 53 ++++---- src/components/organisms/registerForm.tsx | 10 +- .../organisms/searchResults.filters.tsx | 3 +- src/components/organisms/searchResults.tsx | 22 ++-- .../organisms/searchResults.useResults.tsx | 8 +- src/components/organisms/section.tsx | 2 +- src/components/organisms/sequence.tsx | 45 ++++--- src/components/organisms/slider.spec.tsx | 6 +- src/components/organisms/slider.tsx | 3 +- src/components/organisms/testimonies.spec.tsx | 4 +- src/components/organisms/testimonies.tsx | 4 +- .../templates/__generated__/andMiniplayer.ts | 4 +- src/components/templates/andGlobalModals.tsx | 6 +- .../templates/andMiniplayer.spec.tsx | 11 +- .../templates/andNavigation.spec.tsx | 16 ++- src/components/templates/andNavigation.tsx | 20 +-- src/components/templates/andOnboarding.tsx | 9 +- .../templates/andPlaybackContext.tsx | 11 +- src/containers/__generated__/blog.ts | 4 +- src/containers/__generated__/contact.ts | 4 +- src/containers/__generated__/discover.ts | 4 +- src/containers/__generated__/home.ts | 4 +- src/containers/__generated__/testimonies.ts | 4 +- src/containers/about/__generated__/index.ts | 4 +- src/containers/about/index.tsx | 10 +- src/containers/about/purpose.tsx | 19 ++- src/containers/about/spirit.tsx | 13 +- src/containers/about/story.tsx | 13 +- src/containers/about/team.tsx | 21 ++- .../account/__generated__/playlists.ts | 4 +- .../account/__generated__/preferences.ts | 4 +- .../account/__generated__/profile.ts | 4 +- .../account/__generated__/register.ts | 4 +- src/containers/account/__generated__/reset.ts | 4 +- src/containers/account/login.spec.tsx | 6 +- src/containers/account/login.tsx | 2 +- src/containers/account/loginRedirect.tsx | 4 +- src/containers/account/logout.spec.tsx | 8 +- src/containers/account/playlists.spec.tsx | 10 +- src/containers/account/playlists.tsx | 9 +- src/containers/account/preferences.tsx | 22 ++-- src/containers/account/profile.spec.tsx | 19 +-- src/containers/account/profile.tsx | 26 ++-- src/containers/account/register.spec.tsx | 7 +- src/containers/account/register.tsx | 12 +- src/containers/account/reset.spec.tsx | 14 +- src/containers/account/reset.tsx | 18 ++- .../audiobook/__generated__/detail.ts | 4 +- .../audiobook/__generated__/list.ts | 4 +- src/containers/audiobook/detail.ts | 5 +- src/containers/audiobook/list.spec.tsx | 11 +- src/containers/audiobook/list.tsx | 12 +- .../audiobook/tracks/__generated__/detail.ts | 4 +- src/containers/audiobook/tracks/detail.ts | 5 +- src/containers/base.media.spec.tsx | 12 +- src/containers/base.spec.tsx | 4 +- src/containers/base.tsx | 12 +- src/containers/bible/__generated__/book.ts | 4 +- src/containers/bible/__generated__/version.ts | 4 +- .../bible/__generated__/versions.ts | 4 +- src/containers/bible/book.spec.tsx | 16 +-- src/containers/bible/book.tsx | 39 +++--- src/containers/bible/version.spec.tsx | 14 +- src/containers/bible/version.tsx | 28 ++-- src/containers/bible/versions.spec.tsx | 12 +- src/containers/bible/versions.tsx | 18 +-- src/containers/blog.tsx | 12 +- src/containers/blog/__generated__/detail.ts | 4 +- src/containers/blog/detail.spec.tsx | 11 +- src/containers/blog/detail.tsx | 19 ++- .../collection/__generated__/detail.ts | 4 +- .../collection/__generated__/list.ts | 4 +- .../collection/__generated__/presenters.ts | 4 +- .../collection/__generated__/sequences.ts | 4 +- .../collection/__generated__/teachings.ts | 4 +- src/containers/collection/detail.spec.tsx | 9 +- src/containers/collection/detail.tsx | 50 ++++---- src/containers/collection/list.spec.tsx | 7 +- src/containers/collection/list.tsx | 12 +- src/containers/collection/pivot.tsx | 12 +- src/containers/collection/presenters.tsx | 18 +-- src/containers/collection/sequences.tsx | 20 +-- src/containers/collection/teachings.tsx | 18 +-- src/containers/contact.tsx | 24 ++-- src/containers/discover.spec.tsx | 9 +- src/containers/discover.tsx | 22 ++-- .../discover/__generated__/collections.ts | 4 +- src/containers/discover/collections.tsx | 24 ++-- src/containers/give.tsx | 16 +-- src/containers/home.spec.tsx | 11 +- src/containers/home.tsx | 37 +++--- .../library/__generated__/history.ts | 4 +- .../library/__generated__/library.ts | 4 +- src/containers/library/history.tsx | 24 ++-- src/containers/library/library.tsx | 20 +-- src/containers/library/loggedOut.tsx | 12 +- .../library/playlist/__generated__/detail.ts | 4 +- .../library/playlist/__generated__/list.ts | 4 +- src/containers/library/playlist/detail.tsx | 29 ++--- src/containers/library/playlist/list.tsx | 19 ++- src/containers/page/__generated__/detail.ts | 4 +- src/containers/page/detail.spec.ts | 12 +- src/containers/page/detail.tsx | 7 +- .../presenter/__generated__/appears.ts | 4 +- .../presenter/__generated__/detail.ts | 4 +- .../presenter/__generated__/recordings.ts | 4 +- .../presenter/__generated__/sequences.ts | 4 +- src/containers/presenter/__generated__/top.ts | 4 +- src/containers/presenter/appears.tsx | 18 +-- src/containers/presenter/detail.tsx | 46 ++++--- .../presenter/list/__generated__/all.ts | 4 +- .../presenter/list/__generated__/letter.ts | 4 +- .../presenter/list/__generated__/list.ts | 4 +- src/containers/presenter/list/all.spec.tsx | 10 +- src/containers/presenter/list/all.tsx | 14 +- src/containers/presenter/list/letter.spec.tsx | 9 +- src/containers/presenter/list/letter.tsx | 6 +- src/containers/presenter/list/list.tsx | 18 +-- src/containers/presenter/pivot.tsx | 14 +- src/containers/presenter/recordings.spec.tsx | 11 +- src/containers/presenter/recordings.tsx | 24 ++-- src/containers/presenter/sequences.tsx | 20 +-- src/containers/presenter/top.tsx | 12 +- .../release/__generated__/detail.ts | 4 +- src/containers/release/detail.tsx | 18 +-- .../search/__generated__/collections.ts | 4 +- .../search/__generated__/persons.ts | 4 +- .../search/__generated__/sequences.ts | 4 +- .../search/__generated__/sponsors.ts | 4 +- .../search/__generated__/teachings.ts | 4 +- src/containers/search/collections.tsx | 12 +- src/containers/search/index.spec.tsx | 19 ++- src/containers/search/index.tsx | 2 +- src/containers/search/persons.tsx | 12 +- src/containers/search/sequences.tsx | 12 +- src/containers/search/sponsors.tsx | 12 +- src/containers/search/teachings.tsx | 12 +- src/containers/series/__generated__/detail.ts | 4 +- src/containers/series/__generated__/list.ts | 4 +- src/containers/series/detail.spec.tsx | 21 +-- src/containers/series/detail.ts | 5 +- src/containers/series/list.spec.tsx | 11 +- src/containers/series/list.tsx | 12 +- src/containers/sermon/__generated__/detail.ts | 4 +- src/containers/sermon/__generated__/list.ts | 4 +- .../sermon/__generated__/trending.ts | 4 +- src/containers/sermon/detail.spec.tsx | 23 ++-- src/containers/sermon/detail.ts | 5 +- src/containers/sermon/embed.tsx | 20 ++- src/containers/sermon/list.all.spec.tsx | 14 +- src/containers/sermon/list.audio.spec.tsx | 16 ++- src/containers/sermon/list.tsx | 16 +-- src/containers/sermon/list.video.spec.tsx | 11 +- src/containers/sermon/trending.tsx | 19 ++- src/containers/song/__generated__/detail.ts | 4 +- .../song/albums/__generated__/detail.ts | 4 +- .../song/albums/__generated__/list.ts | 4 +- src/containers/song/albums/detail.spec.tsx | 9 +- src/containers/song/albums/detail.ts | 5 +- src/containers/song/albums/list.spec.tsx | 11 +- src/containers/song/albums/list.tsx | 21 ++- .../song/books/__generated__/detail.ts | 4 +- .../song/books/__generated__/track.ts | 4 +- src/containers/song/books/detail.spec.tsx | 9 +- src/containers/song/books/detail.tsx | 32 ++--- src/containers/song/books/track.tsx | 8 +- src/containers/song/detail.ts | 5 +- .../sponsor/__generated__/conferences.ts | 4 +- .../sponsor/__generated__/detail.ts | 4 +- .../sponsor/__generated__/series.ts | 4 +- .../sponsor/__generated__/teachings.ts | 4 +- src/containers/sponsor/conferences.spec.tsx | 9 +- src/containers/sponsor/conferences.tsx | 18 +-- src/containers/sponsor/detail.spec.tsx | 9 +- src/containers/sponsor/detail.tsx | 46 ++++--- .../sponsor/list/__generated__/all.ts | 4 +- .../sponsor/list/__generated__/letter.ts | 4 +- .../sponsor/list/__generated__/list.ts | 4 +- src/containers/sponsor/list/all.spec.tsx | 10 +- src/containers/sponsor/list/all.tsx | 14 +- src/containers/sponsor/list/letter.spec.tsx | 11 +- src/containers/sponsor/list/letter.tsx | 6 +- src/containers/sponsor/list/list.tsx | 18 +-- src/containers/sponsor/pivot.tsx | 14 +- src/containers/sponsor/series.spec.tsx | 11 +- src/containers/sponsor/series.tsx | 18 +-- src/containers/sponsor/teachings.spec.tsx | 11 +- src/containers/sponsor/teachings.tsx | 24 ++-- src/containers/story/__generated__/detail.ts | 4 +- .../story/albums/__generated__/detail.ts | 4 +- .../story/albums/__generated__/list.ts | 4 +- src/containers/story/albums/detail.ts | 5 +- src/containers/story/albums/list.spec.tsx | 13 +- src/containers/story/albums/list.tsx | 12 +- src/containers/story/detail.spec.tsx | 9 +- src/containers/story/detail.tsx | 5 +- src/containers/testimonies.spec.tsx | 11 +- src/containers/testimonies.tsx | 19 ++- src/lib/__mocks__/getIntlMessages.ts | 2 +- src/lib/api/__generated__/bibleContent.ts | 4 +- .../api/__generated__/collectionFavorite.ts | 4 +- .../__generated__/collectionIsFavorited.ts | 4 +- .../api/__generated__/collectionUnfavorite.ts | 4 +- src/lib/api/__generated__/login.ts | 4 +- src/lib/api/__generated__/personFavorite.ts | 4 +- .../api/__generated__/personIsFavorited.ts | 4 +- src/lib/api/__generated__/personUnfavorite.ts | 4 +- .../api/__generated__/recordingFavorite.ts | 4 +- .../api/__generated__/recordingIsFavorited.ts | 4 +- .../api/__generated__/recordingUnfavorite.ts | 4 +- src/lib/api/__generated__/sequenceFavorite.ts | 4 +- .../api/__generated__/sequenceIsFavorited.ts | 4 +- .../api/__generated__/sequenceUnfavorite.ts | 4 +- src/lib/api/__generated__/sponsorFavorite.ts | 4 +- .../api/__generated__/sponsorIsFavorited.ts | 4 +- .../api/__generated__/sponsorUnfavorite.ts | 4 +- src/lib/api/fetchApi.spec.ts | 6 +- src/lib/api/fetchApi.ts | 6 +- src/lib/api/graphqlFetcher.ts | 2 +- src/lib/api/login.ts | 4 +- src/lib/api/personIsFavorited.ts | 3 +- src/lib/api/recordingIsFavorited.ts | 3 +- src/lib/api/setPlaylistMembership.ts | 4 +- src/lib/api/sponsorIsFavorited.ts | 3 +- src/lib/api/useIsCollectionFavorited.ts | 8 +- src/lib/api/useIsFavorited.ts | 4 +- src/lib/api/useIsPersonFavorited.ts | 4 +- src/lib/api/useIsRecordingFavorited.ts | 4 +- src/lib/api/useIsSequenceFavorited.ts | 10 +- src/lib/api/useIsSponsorFavorited.ts | 4 +- src/lib/api/useLogout.spec.tsx | 4 +- src/lib/api/useLogout.ts | 4 +- src/lib/api/useSetPlaylistMembership.ts | 4 +- src/lib/constants.ts | 2 +- src/lib/cookies.ts | 3 +- src/lib/generateFeed.spec.ts | 3 +- src/lib/generateFeed.ts | 5 +- src/lib/getAppFeatures.tsx | 2 +- src/lib/getDehydratedProps.ts | 3 +- src/lib/getDetailStaticPaths.tsx | 4 +- src/lib/getIntl.ts | 6 +- src/lib/getIntlMessages.spec.ts | 4 +- src/lib/getIntlMessages.ts | 2 +- src/lib/getLangaugeIdByRoute.spec.ts | 3 +- src/lib/getLanguageByBaseUrl.ts | 2 +- src/lib/getLanguageDisplayNames.ts | 2 +- src/lib/getLanguageIdByRoute.ts | 4 +- src/lib/getLanguageIdByRouteOrLegacyRoute.ts | 2 +- src/lib/getLanguageIds.ts | 2 +- src/lib/getLanguageRoutes.ts | 2 +- src/lib/getNumberedStaticPaths.spec.ts | 4 +- src/lib/getNumberedStaticPaths.ts | 7 +- src/lib/getPageOffset.ts | 2 +- src/lib/getPaginatedData.ts | 4 +- src/lib/getPaginatedStaticProps.spec.ts | 2 +- src/lib/getPaginatedStaticProps.ts | 13 +- src/lib/getPaginationPageCount.ts | 2 +- src/lib/getRecordingTheme.ts | 4 +- src/lib/getSequenceType.tsx | 4 +- src/lib/getValidLanguage.ts | 3 +- src/lib/hasVideo.ts | 2 +- src/lib/hooks/useOnScreen.ts | 3 +- src/lib/routes/bibles.ts | 3 +- src/lib/routes/books.ts | 3 +- src/lib/routes/conferences.ts | 3 +- src/lib/routes/index.ts | 14 +- src/lib/routes/library.ts | 3 +- src/lib/routes/presenters.ts | 3 +- src/lib/routes/releases.ts | 3 +- src/lib/routes/series.ts | 3 +- src/lib/routes/songs.ts | 3 +- src/lib/routes/sponsors.ts | 3 +- src/lib/routes/stories.ts | 3 +- src/lib/test/buildLoader.ts | 2 +- src/lib/test/buildRenderer.tsx | 2 +- src/lib/test/buildServerRenderer.ts | 2 +- src/lib/test/buildStaticRenderer.ts | 2 +- src/lib/test/loadAuthGuardData.ts | 4 +- src/lib/test/renderWithProviders.tsx | 4 +- src/lib/test/resolveWithDelay.ts | 2 +- src/lib/useLanguageId.ts | 6 +- src/lib/useLanguageRoute.ts | 2 +- src/lib/useNavigationItems.tsx | 82 ++++++------ src/lib/usePlaybackSession.tsx | 10 +- src/lib/useQueryString.ts | 2 +- src/lib/useRouterQuery.ts | 3 +- src/pages/404.tsx | 4 +- src/pages/[language]/about/1/[[...slugs]].ts | 14 +- src/pages/[language]/about/12/[[...slugs]].ts | 14 +- src/pages/[language]/about/13/[[...slugs]].ts | 14 +- src/pages/[language]/about/7/[[...slugs]].ts | 14 +- .../[language]/about/[id]/[[...slugs]].ts | 12 +- src/pages/[language]/account/login.ts | 14 +- src/pages/[language]/account/logout.tsx | 6 +- src/pages/[language]/account/preferences.ts | 9 +- src/pages/[language]/account/profile.ts | 9 +- src/pages/[language]/account/register.tsx | 14 +- src/pages/[language]/account/reset.tsx | 4 +- .../[language]/bibles/[id]/[[...slugs]].ts | 16 +-- .../bibles/[id]/[book]/[chapter].tsx | 10 +- .../bibles/chapters/[id]/[[...slugs]].ts | 14 +- src/pages/[language]/bibles/index.tsx | 17 ++- .../[language]/blog/[id]/[[...slugs]].ts | 15 ++- src/pages/[language]/blog/page/[i].tsx | 13 +- .../[language]/books/[id]/[[...slugs]].tsx | 16 +-- .../[language]/books/[id]/feed.xml/index.ts | 11 +- src/pages/[language]/books/page/[i].tsx | 16 +-- .../books/tracks/[id]/[[...slugs]].tsx | 16 +-- .../conferences/[id]/[[...slug]].tsx | 16 +-- .../conferences/[id]/feed.xml/index.ts | 6 +- .../conferences/[id]/presenters/page/[i].tsx | 12 +- .../conferences/[id]/sequences/page/[i].ts | 12 +- .../conferences/[id]/teachings/page/[i].ts | 12 +- src/pages/[language]/conferences/page/[i].tsx | 16 +-- src/pages/[language]/contact/[type].ts | 12 +- src/pages/[language]/discover/collections.ts | 17 ++- src/pages/[language]/discover/index.ts | 17 ++- src/pages/[language]/embed/media/[id].ts | 12 +- src/pages/[language]/give.ts | 14 +- src/pages/[language]/index.ts | 13 +- src/pages/[language]/library/history.tsx | 6 +- src/pages/[language]/library/index.ts | 6 +- src/pages/[language]/library/playlist/[id].ts | 6 +- src/pages/[language]/library/playlists.ts | 6 +- .../[language]/page/[id]/[[...slugs]].ts | 15 ++- .../presenters/[id]/[[...slug]].tsx | 16 +-- .../presenters/[id]/appears/page/[i].tsx | 12 +- .../presenters/[id]/feed.xml/index.ts | 8 +- .../presenters/[id]/sequences/page/[i].tsx | 12 +- .../presenters/[id]/teachings/page/[i].tsx | 12 +- src/pages/[language]/presenters/[id]/top.ts | 18 +-- src/pages/[language]/presenters/all.tsx | 15 ++- .../[language]/presenters/letter/[letter].tsx | 18 +-- src/pages/[language]/releases/[id].ts | 12 +- .../[language]/search/collections/page/[i].ts | 9 +- src/pages/[language]/search/index.ts | 14 +- .../[language]/search/persons/page/[i].ts | 9 +- .../[language]/search/sequences/page/[i].ts | 9 +- .../[language]/search/sponsors/page/[i].ts | 9 +- .../[language]/search/teachings/page/[i].ts | 9 +- .../[language]/series/[id]/[[...slug]].tsx | 12 +- .../[language]/series/[id]/feed.xml/index.ts | 6 +- src/pages/[language]/series/page/[i].tsx | 12 +- .../[language]/songs/[id]/[[...slugs]].ts | 12 +- .../songs/albums/[id]/[[...slugs]].tsx | 12 +- .../songs/albums/[id]/feed.xml/index.ts | 6 +- src/pages/[language]/songs/albums/index.ts | 17 ++- src/pages/[language]/songs/book/[book].tsx | 17 ++- .../songs/book/[book]/[id]/[[...slugs]].ts | 11 +- .../[language]/sponsors/[id]/[[...slugs]].tsx | 12 +- .../sponsors/[id]/conferences/page/[i].tsx | 14 +- .../sponsors/[id]/series/page/[i].tsx | 10 +- .../sponsors/[id]/teachings/feed.xml/index.ts | 8 +- .../sponsors/[id]/teachings/page/[i].tsx | 14 +- src/pages/[language]/sponsors/all.tsx | 19 +-- .../[language]/sponsors/letter/[letter].tsx | 18 +-- .../[language]/stories/[id]/[[...slugs]].tsx | 12 +- .../stories/albums/[id]/[[...slugs]].tsx | 16 +-- .../stories/albums/[id]/feed.xml/index.ts | 8 +- .../[language]/stories/albums/page/[i].tsx | 12 +- .../[language]/teachings/[id]/[[...slug]].ts | 12 +- .../teachings/all/feed.xml/index.ts | 13 +- .../[language]/teachings/all/page/[i].tsx | 14 +- .../[language]/teachings/audio/page/[i].tsx | 14 +- .../[language]/teachings/trending/all.ts | 20 +-- .../[language]/teachings/trending/audio.ts | 11 +- .../[language]/teachings/trending/video.ts | 11 +- .../[language]/teachings/video/page/[i].tsx | 14 +- src/pages/[language]/testimonies/page/[i].tsx | 12 +- src/pages/_app.tsx | 3 +- src/pages/api/download/[[...slugs]].ts | 2 +- src/types/next-router.d.ts | 3 +- testSetup.ts | 5 +- tsconfig.json | 12 +- 501 files changed, 2386 insertions(+), 2379 deletions(-) rename public/{worker-CnjDupQ7iaFo-4jYqkTvL.js => worker-nkFu_-PkopJY0W7W9dQCn.js} (100%) delete mode 100644 public/worker-ymWX0Gy9LQDCSp4OnpJ6y.js diff --git a/.eslintrc.js b/.eslintrc.js index 2454a71c4..c6f1e0ca0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,6 +13,8 @@ module.exports = { 'react-hooks', 'lodash', '@calm/react-intl', + 'simple-import-sort', + 'import', ], extends: [ 'eslint:recommended', @@ -51,13 +53,6 @@ module.exports = { }, ], '@calm/react-intl/missing-values': 2, - 'sort-imports': [ - 'error', - { - ignoreDeclarationSort: true, - ignoreCase: true, - }, - ], '@typescript-eslint/no-unused-vars': [ 'error', { @@ -75,6 +70,10 @@ module.exports = { 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', 'lodash/import-scope': ['error', 'method'], + 'simple-import-sort/imports': 'error', + 'import/first': 'error', + 'import/newline-after-import': 'error', + 'import/no-duplicates': 'error', }, settings: { react: { diff --git a/.graphqlrc.yml b/.graphqlrc.yml index c5ba53c93..bdf8dcd67 100644 --- a/.graphqlrc.yml +++ b/.graphqlrc.yml @@ -34,7 +34,7 @@ generates: - 'typescript-react-query' - 'graphql-plugin-getters.js' config: - fetcher: '@lib/api/graphqlFetcher#graphqlFetcher' + fetcher: '~lib/api/graphqlFetcher#graphqlFetcher' dedupeFragments: true avoidOptionals: true defaultScalarType: unknown diff --git a/__mocks__/next/router.ts b/__mocks__/next/router.ts index 78c8803fb..9c0853965 100644 --- a/__mocks__/next/router.ts +++ b/__mocks__/next/router.ts @@ -1,6 +1,5 @@ -import { ParsedUrlQuery } from 'querystring'; - import Router_, { NextRouter } from 'next/router'; +import { ParsedUrlQuery } from 'querystring'; const Router: typeof Router_ = { events: { diff --git a/graphql-plugin-getters.js b/graphql-plugin-getters.js index 3a4f50b35..cc7ed58d7 100644 --- a/graphql-plugin-getters.js +++ b/graphql-plugin-getters.js @@ -40,6 +40,6 @@ module.exports = { if (!result) return ''; - return `import { fetchApi } from '@lib/api/fetchApi' \n${result}`; + return `import { fetchApi } from '~lib/api/fetchApi' \n${result}`; }, }; diff --git a/jest.config.strict.ts b/jest.config.strict.ts index 6d97e337b..528fc8fac 100644 --- a/jest.config.strict.ts +++ b/jest.config.strict.ts @@ -1,6 +1,7 @@ -import base from './jest.config'; import type { Config } from '@jest/types'; +import base from './jest.config'; + const config: Config.InitialOptions = { ...base, setupFilesAfterEnv: ['/testSetup.strict.ts'], diff --git a/jest.config.ts b/jest.config.ts index 290df290d..0ff474ca9 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -1,5 +1,5 @@ -import getJestMappersFromTSConfig from 'tsconfig-paths-jest-mapper'; import type { Config } from '@jest/types'; +import getJestMappersFromTSConfig from 'tsconfig-paths-jest-mapper'; const moduleNameMapper = getJestMappersFromTSConfig(''); diff --git a/package-lock.json b/package-lock.json index 75f9e1b22..92000ca4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -81,10 +81,12 @@ "eslint": "^8.9.0", "eslint-config-next": "^13.0.3", "eslint-plugin-formatjs": "^3.0.0", + "eslint-plugin-import": "^2.27.5", "eslint-plugin-jest-dom": "^4.0.1", "eslint-plugin-lodash": "^7.4.0", "eslint-plugin-react": "^7.31.11", "eslint-plugin-react-hooks": "^4.3.0", + "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-testing-library": "^5.0.5", "graphql": "^16.3.0", "graphql-tag": "^2.12.6", @@ -10809,13 +10811,14 @@ } }, "node_modules/eslint-import-resolver-node": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", - "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", "dev": true, "dependencies": { "debug": "^3.2.7", - "resolve": "^1.20.0" + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" } }, "node_modules/eslint-import-resolver-node/node_modules/debug": { @@ -11064,23 +11067,25 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", - "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", "dev": true, "dependencies": { - "array-includes": "^3.1.4", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.3", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", "has": "^1.0.3", - "is-core-module": "^2.8.1", + "is-core-module": "^2.11.0", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.values": "^1.1.5", - "resolve": "^1.22.0", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", "tsconfig-paths": "^3.14.1" }, "engines": { @@ -11091,12 +11096,12 @@ } }, "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "dependencies": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "node_modules/eslint-plugin-import/node_modules/doctrine": { @@ -11111,11 +11116,14 @@ "node": ">=0.10.0" } }, - "node_modules/eslint-plugin-import/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } }, "node_modules/eslint-plugin-jest-dom": { "version": "4.0.1", @@ -11291,6 +11299,15 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-simple-import-sort": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz", + "integrity": "sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==", + "dev": true, + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, "node_modules/eslint-plugin-testing-library": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.0.5.tgz", @@ -31729,13 +31746,14 @@ } }, "eslint-import-resolver-node": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", - "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", "dev": true, "requires": { "debug": "^3.2.7", - "resolve": "^1.20.0" + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" }, "dependencies": { "debug": { @@ -31930,33 +31948,35 @@ } }, "eslint-plugin-import": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", - "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", "dev": true, "requires": { - "array-includes": "^3.1.4", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.3", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", "has": "^1.0.3", - "is-core-module": "^2.8.1", + "is-core-module": "^2.11.0", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.values": "^1.1.5", - "resolve": "^1.22.0", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", "tsconfig-paths": "^3.14.1" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "doctrine": { @@ -31968,10 +31988,10 @@ "esutils": "^2.0.2" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } @@ -32107,6 +32127,13 @@ "dev": true, "requires": {} }, + "eslint-plugin-simple-import-sort": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz", + "integrity": "sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==", + "dev": true, + "requires": {} + }, "eslint-plugin-testing-library": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.0.5.tgz", diff --git a/package.json b/package.json index 534b8aff6..bfec92e70 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "audit": "audit-ci --config audit-ci.json", "checkTs": "tsc --noEmit", "format": "prettier --write .", - "lint": "eslint --max-warnings 0 --ext .ts --ext .tsx --ext .js --ext .jsx src/", - "lint:fix": "eslint --max-warnings 0 --fix --ext .ts --ext .tsx --ext .js --ext .jsx src/", + "lint": "eslint --max-warnings 0 .", + "lint:fix": "eslint --max-warnings 0 --fix .", "start": "NODE_ICU_DATA=node_modules/full-icu next start", "test": "TZ=UTC jest --maxWorkers=50%", "test:watch": "TZ=UTC jest --watch --maxWorkers=25%", @@ -103,10 +103,12 @@ "eslint": "^8.9.0", "eslint-config-next": "^13.0.3", "eslint-plugin-formatjs": "^3.0.0", + "eslint-plugin-import": "^2.27.5", "eslint-plugin-jest-dom": "^4.0.1", "eslint-plugin-lodash": "^7.4.0", "eslint-plugin-react": "^7.31.11", "eslint-plugin-react-hooks": "^4.3.0", + "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-testing-library": "^5.0.5", "graphql": "^16.3.0", "graphql-tag": "^2.12.6", diff --git a/public/worker-CnjDupQ7iaFo-4jYqkTvL.js b/public/worker-nkFu_-PkopJY0W7W9dQCn.js similarity index 100% rename from public/worker-CnjDupQ7iaFo-4jYqkTvL.js rename to public/worker-nkFu_-PkopJY0W7W9dQCn.js diff --git a/public/worker-ymWX0Gy9LQDCSp4OnpJ6y.js b/public/worker-ymWX0Gy9LQDCSp4OnpJ6y.js deleted file mode 100644 index 858784927..000000000 --- a/public/worker-ymWX0Gy9LQDCSp4OnpJ6y.js +++ /dev/null @@ -1 +0,0 @@ -self.__WB_DISABLE_DEV_LOGS=!0; \ No newline at end of file diff --git a/src/components/HOCs/__generated__/withAuthGuard.ts b/src/components/HOCs/__generated__/withAuthGuard.ts index a9a3fa010..86a7c1e4f 100644 --- a/src/components/HOCs/__generated__/withAuthGuard.ts +++ b/src/components/HOCs/__generated__/withAuthGuard.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetWithAuthGuardDataQueryVariables = Types.Exact<{ [key: string]: never; }>; @@ -30,7 +30,7 @@ export const useGetWithAuthGuardDataQuery = < graphqlFetcher(GetWithAuthGuardDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getWithAuthGuardData( variables: ExactAlt diff --git a/src/components/HOCs/withAuthGuard.spec.tsx b/src/components/HOCs/withAuthGuard.spec.tsx index bf73f35c9..1e3466486 100644 --- a/src/components/HOCs/withAuthGuard.spec.tsx +++ b/src/components/HOCs/withAuthGuard.spec.tsx @@ -6,11 +6,12 @@ import { __loadRouter } from 'next/router'; import React, { ReactElement } from 'react'; import { QueryClient } from 'react-query'; -import withAuthGuard from '@components/HOCs/withAuthGuard'; -import { fetchApi } from '@lib/api/fetchApi'; -import renderWithProviders from '@lib/test/renderWithProviders'; +import withAuthGuard from '~components/HOCs/withAuthGuard'; +import { RegisterSocialDocument } from '~containers/account/__generated__/register'; +import { fetchApi } from '~lib/api/fetchApi'; +import renderWithProviders from '~lib/test/renderWithProviders'; + import { GetWithAuthGuardDataDocument } from './__generated__/withAuthGuard'; -import { RegisterSocialDocument } from '@containers/account/__generated__/register'; function render() { const Comp = withAuthGuard(() => <>hello world); diff --git a/src/components/HOCs/withAuthGuard.tsx b/src/components/HOCs/withAuthGuard.tsx index d88e599d2..c92601a31 100644 --- a/src/components/HOCs/withAuthGuard.tsx +++ b/src/components/HOCs/withAuthGuard.tsx @@ -1,8 +1,9 @@ import React from 'react'; -import Login from '@components/molecules/login'; -import { getCurrentRequest } from '@lib/api/storeRequest'; -import { getSessionToken } from '@lib/cookies'; +import Login from '~components/molecules/login'; +import { getCurrentRequest } from '~lib/api/storeRequest'; +import { getSessionToken } from '~lib/cookies'; + import { useGetWithAuthGuardDataQuery } from './__generated__/withAuthGuard'; function withAuthGuard

( diff --git a/src/components/HOCs/withFailStates.spec.tsx b/src/components/HOCs/withFailStates.spec.tsx index efe2189f2..179730b5c 100644 --- a/src/components/HOCs/withFailStates.spec.tsx +++ b/src/components/HOCs/withFailStates.spec.tsx @@ -2,7 +2,7 @@ import { render } from '@testing-library/react'; import { useRouter } from 'next/router'; import React from 'react'; -import withFailStates from '@components/HOCs/withFailStates'; +import withFailStates from '~components/HOCs/withFailStates'; jest.mock('next/router'); diff --git a/src/components/HOCs/withFailStates.tsx b/src/components/HOCs/withFailStates.tsx index e1e7e8b7b..b3e989f4c 100644 --- a/src/components/HOCs/withFailStates.tsx +++ b/src/components/HOCs/withFailStates.tsx @@ -1,8 +1,8 @@ import { useRouter } from 'next/router'; import React from 'react'; -import LoadingCards from '@components/molecules/loadingCards'; -import NotFoundBase from '@components/organisms/notFound'; +import LoadingCards from '~components/molecules/loadingCards'; +import NotFoundBase from '~components/organisms/notFound'; type WithFailStateOptions

= { useShould404?: (props: P) => boolean; diff --git a/src/components/HOCs/withIntl.tsx b/src/components/HOCs/withIntl.tsx index cb29edc73..c9d3b2bae 100644 --- a/src/components/HOCs/withIntl.tsx +++ b/src/components/HOCs/withIntl.tsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import { IntlProvider, ResolvedIntlConfig } from 'react-intl'; -import getIntlMessages from '@lib/getIntlMessages'; -import handleIntlError from '@lib/handleIntlError'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import getIntlMessages from '~lib/getIntlMessages'; +import handleIntlError from '~lib/handleIntlError'; +import useLanguageRoute from '~lib/useLanguageRoute'; type Messages = ResolvedIntlConfig['messages']; diff --git a/src/components/atoms/horizontalRule.tsx b/src/components/atoms/horizontalRule.tsx index 6e3b3159a..9d5211d39 100644 --- a/src/components/atoms/horizontalRule.tsx +++ b/src/components/atoms/horizontalRule.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx'; import React from 'react'; -import { BaseColors } from '@lib/constants'; +import { BaseColors } from '~lib/constants'; import baseColors from './baseColors.module.scss'; import styles from './horizontalRule.module.scss'; diff --git a/src/components/atoms/lineHeading.tsx b/src/components/atoms/lineHeading.tsx index 72c602a12..4b87074b1 100644 --- a/src/components/atoms/lineHeading.tsx +++ b/src/components/atoms/lineHeading.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx'; import React, { ReactNode } from 'react'; -import { BaseColors } from '@lib/constants'; +import { BaseColors } from '~lib/constants'; import styles from './lineHeading.module.scss'; diff --git a/src/components/molecules/__generated__/helpWidget.ts b/src/components/molecules/__generated__/helpWidget.ts index 574ef05c8..96561538a 100644 --- a/src/components/molecules/__generated__/helpWidget.ts +++ b/src/components/molecules/__generated__/helpWidget.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetHelpWidgetDataQueryVariables = Types.Exact<{ [key: string]: never; }>; @@ -43,7 +43,7 @@ export const useGetHelpWidgetDataQuery = < graphqlFetcher(GetHelpWidgetDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getHelpWidgetData( variables: ExactAlt diff --git a/src/components/molecules/__generated__/login.ts b/src/components/molecules/__generated__/login.ts index 9d8233236..5bc047808 100644 --- a/src/components/molecules/__generated__/login.ts +++ b/src/components/molecules/__generated__/login.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type LoginForgotPasswordMutationVariables = Types.Exact<{ email: Types.Scalars['String']; }>; @@ -29,7 +29,7 @@ export const useLoginForgotPasswordMutation = < (variables?: LoginForgotPasswordMutationVariables) => graphqlFetcher(LoginForgotPasswordDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function loginForgotPassword( variables: ExactAlt diff --git a/src/components/molecules/bibleVersionTypeLockup.tsx b/src/components/molecules/bibleVersionTypeLockup.tsx index 64f1b9f6a..21deb089d 100644 --- a/src/components/molecules/bibleVersionTypeLockup.tsx +++ b/src/components/molecules/bibleVersionTypeLockup.tsx @@ -1,10 +1,9 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import { BaseColors } from '@lib/constants'; +import { BaseColors } from '~lib/constants'; import BibleIcon from '../../../public/img/icons/fa-bible.svg'; - import TypeLockup from './typeLockup'; type Props = { diff --git a/src/components/molecules/buttonBack.tsx b/src/components/molecules/buttonBack.tsx index 1251f79db..341efc632 100644 --- a/src/components/molecules/buttonBack.tsx +++ b/src/components/molecules/buttonBack.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Button, { IButtonType } from '@components/molecules/button'; +import Button, { IButtonType } from '~components/molecules/button'; import IconBack from '../../../public/img/icons/icon-back-light.svg'; diff --git a/src/components/molecules/buttonDownload.tsx b/src/components/molecules/buttonDownload.tsx index 511d337e9..d4f8ae2eb 100644 --- a/src/components/molecules/buttonDownload.tsx +++ b/src/components/molecules/buttonDownload.tsx @@ -1,18 +1,16 @@ import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading6 from '@components/atoms/heading6'; -import { BaseColors } from '@lib/constants'; - -import { readableBytes } from '@lib/readableBytes'; +import Heading6 from '~components/atoms/heading6'; +import { BaseColors } from '~lib/constants'; +import { readableBytes } from '~lib/readableBytes'; import IconDownload from '../../../public/img/icons/icon-download.svg'; - +import { ButtonDownloadFragment } from './__generated__/buttonDownload'; import styles from './buttonDownload.module.scss'; import { isBackgroundColorDark } from './buttonPlay'; import Dropdown from './dropdown'; import IconButton from './iconButton'; -import { ButtonDownloadFragment } from './__generated__/buttonDownload'; export default function ButtonDownload({ recording, diff --git a/src/components/molecules/buttonFavorite.tsx b/src/components/molecules/buttonFavorite.tsx index 9507f8b4e..16d29e5a4 100644 --- a/src/components/molecules/buttonFavorite.tsx +++ b/src/components/molecules/buttonFavorite.tsx @@ -1,12 +1,11 @@ import React, { Ref } from 'react'; import { useIntl } from 'react-intl'; -import { BaseColors } from '@lib/constants'; +import { BaseColors } from '~lib/constants'; +import IconLike from '../../../public/img/icons/icon-like.svg'; import IconLikeActive from '../../../public/img/icons/icon-like-active.svg'; import IconLikeLight from '../../../public/img/icons/icon-like-light.svg'; -import IconLike from '../../../public/img/icons/icon-like.svg'; - import { isBackgroundColorDark } from './buttonPlay'; import IconButton from './iconButton'; diff --git a/src/components/molecules/buttonGuest.tsx b/src/components/molecules/buttonGuest.tsx index b325ca67b..03fce5704 100644 --- a/src/components/molecules/buttonGuest.tsx +++ b/src/components/molecules/buttonGuest.tsx @@ -4,13 +4,12 @@ import { useRouter } from 'next/router'; import React, { useState } from 'react'; import { FormattedMessage } from 'react-intl'; -import Button from '@components/molecules/button'; -import Modal from '@components/organisms/modal'; -import root, { isRedirectRouteAllowed } from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Button from '~components/molecules/button'; +import Modal from '~components/organisms/modal'; +import root, { isRedirectRouteAllowed } from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import Icon from '../../../public/img/icons/icon-info.svg'; - import styles from './buttonGuest.module.scss'; export default function ButtonGuest({ diff --git a/src/components/molecules/buttonNudge.tsx b/src/components/molecules/buttonNudge.tsx index 435b4b9fb..546058d0e 100644 --- a/src/components/molecules/buttonNudge.tsx +++ b/src/components/molecules/buttonNudge.tsx @@ -2,19 +2,17 @@ import clsx from 'clsx'; import React from 'react'; import { useIntl } from 'react-intl'; -import { BaseColors } from '@lib/constants'; +import { AndMiniplayerFragment } from '~components/templates/__generated__/andMiniplayer'; +import { BaseColors } from '~lib/constants'; +import usePlaybackSession from '~lib/usePlaybackSession'; -import usePlaybackSession from '@lib/usePlaybackSession'; - -import IconJumpBackMedium from '../../../public/img/icons/icon-jump-back-medium.svg'; import IconJumpBack from '../../../public/img/icons/icon-jump-back.svg'; -import IconJumpForwardMedium from '../../../public/img/icons/icon-jump-forward-medium.svg'; +import IconJumpBackMedium from '../../../public/img/icons/icon-jump-back-medium.svg'; import IconJumpForward from '../../../public/img/icons/icon-jump-forward.svg'; - +import IconJumpForwardMedium from '../../../public/img/icons/icon-jump-forward-medium.svg'; import styles from './buttonNudge.module.scss'; import { isBackgroundColorDark } from './buttonPlay'; import IconButton from './iconButton'; -import { AndMiniplayerFragment } from '@components/templates/__generated__/andMiniplayer'; export default function ButtonNudge({ recording, diff --git a/src/components/molecules/buttonPlay.tsx b/src/components/molecules/buttonPlay.tsx index 41273a7a0..77a0c7926 100644 --- a/src/components/molecules/buttonPlay.tsx +++ b/src/components/molecules/buttonPlay.tsx @@ -2,18 +2,16 @@ import clsx from 'clsx'; import React from 'react'; import { useIntl } from 'react-intl'; -import { BaseColors } from '@lib/constants'; - -import usePlaybackSession from '@lib/usePlaybackSession'; +import { AndMiniplayerFragment } from '~components/templates/__generated__/andMiniplayer'; +import { BaseColors } from '~lib/constants'; +import usePlaybackSession from '~lib/usePlaybackSession'; import IconPauseLarge from '../../../public/img/icons/icon-pause-large.svg'; import IconPause from '../../../public/img/icons/icon-pause-medium.svg'; import IconPlayLarge from '../../../public/img/icons/icon-play-large.svg'; import IconPlay from '../../../public/img/icons/icon-play-medium.svg'; - import styles from './buttonPlay.module.scss'; import IconButton from './iconButton'; -import { AndMiniplayerFragment } from '@components/templates/__generated__/andMiniplayer'; export const isBackgroundColorDark = (backgroundColor: BaseColors): boolean => [ diff --git a/src/components/molecules/buttonPlayback.tsx b/src/components/molecules/buttonPlayback.tsx index 04048839f..fdd800a47 100644 --- a/src/components/molecules/buttonPlayback.tsx +++ b/src/components/molecules/buttonPlayback.tsx @@ -1,11 +1,13 @@ -import { PlaybackContext } from '@components/templates/andPlaybackContext'; -import IconButton from '@components/molecules/iconButton'; +import { useRouter } from 'next/router'; import React, { useContext } from 'react'; -import IconListeningAnimated from '../../../public/img/icons/icon-listening-animated.svg'; -import IconListening from '../../../public/img/icons/icon-listening.svg'; -import { BaseColors } from '@lib/constants'; import { useIntl } from 'react-intl'; -import { useRouter } from 'next/router'; + +import IconButton from '~components/molecules/iconButton'; +import { PlaybackContext } from '~components/templates/andPlaybackContext'; +import { BaseColors } from '~lib/constants'; + +import IconListening from '../../../public/img/icons/icon-listening.svg'; +import IconListeningAnimated from '../../../public/img/icons/icon-listening-animated.svg'; export default function ButtonPlayback(): JSX.Element { const context = useContext(PlaybackContext); diff --git a/src/components/molecules/buttonShare.tsx b/src/components/molecules/buttonShare.tsx index 1515497c1..9fbd4d386 100644 --- a/src/components/molecules/buttonShare.tsx +++ b/src/components/molecules/buttonShare.tsx @@ -1,12 +1,11 @@ import React, { MouseEvent, PropsWithChildren, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading6 from '@components/atoms/heading6'; -import { BaseColors } from '@lib/constants'; +import Heading6 from '~components/atoms/heading6'; +import { BaseColors } from '~lib/constants'; -import IconShareLight from '../../../public/img/icons/icon-share-light.svg'; import IconShare from '../../../public/img/icons/icon-share.svg'; - +import IconShareLight from '../../../public/img/icons/icon-share-light.svg'; import { isBackgroundColorDark } from './buttonPlay'; import styles from './buttonShare.module.scss'; import Dropdown from './dropdown'; diff --git a/src/components/molecules/buttonShareRecording.tsx b/src/components/molecules/buttonShareRecording.tsx index a997e80ff..6730056f0 100644 --- a/src/components/molecules/buttonShareRecording.tsx +++ b/src/components/molecules/buttonShareRecording.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading6 from '@components/atoms/heading6'; -import { BaseColors } from '@lib/constants'; +import Heading6 from '~components/atoms/heading6'; +import { BaseColors } from '~lib/constants'; +import { ButtonShareRecordingFragment } from './__generated__/buttonShareRecording'; import ButtonShare from './buttonShare'; import styles from './buttonShareRecording.module.scss'; -import { ButtonShareRecordingFragment } from './__generated__/buttonShareRecording'; export default function ButtonShareRecording({ recording, diff --git a/src/components/molecules/buttonSpeed.tsx b/src/components/molecules/buttonSpeed.tsx index 760218b10..ee387be5b 100644 --- a/src/components/molecules/buttonSpeed.tsx +++ b/src/components/molecules/buttonSpeed.tsx @@ -2,14 +2,13 @@ import clsx from 'clsx'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import { BaseColors } from '@lib/constants'; - -import usePlaybackSession from '@lib/usePlaybackSession'; +import { AndMiniplayerFragment } from '~components/templates/__generated__/andMiniplayer'; +import { BaseColors } from '~lib/constants'; +import usePlaybackSession from '~lib/usePlaybackSession'; import { isBackgroundColorDark } from './buttonPlay'; import styles from './buttonSpeed.module.scss'; import CircleButton from './circleButton'; -import { AndMiniplayerFragment } from '@components/templates/__generated__/andMiniplayer'; export default function ButtonSpeed({ recording, diff --git a/src/components/molecules/card/audiobookTrack.tsx b/src/components/molecules/card/audiobookTrack.tsx index 3845411de..0b812437a 100644 --- a/src/components/molecules/card/audiobookTrack.tsx +++ b/src/components/molecules/card/audiobookTrack.tsx @@ -1,10 +1,9 @@ import React from 'react'; import TeaseRecording from '../teaseRecording'; - +import { CardRecordingFragment } from './__generated__/recording'; import CardWithTheme from './base/withTheme'; import CardHatAudiobook from './hat/audiobook'; -import { CardRecordingFragment } from './__generated__/recording'; interface CardAudiobookTrackProps { track: CardRecordingFragment; diff --git a/src/components/molecules/card/base/withTheme.tsx b/src/components/molecules/card/base/withTheme.tsx index 8452c14ec..3ab498bc8 100644 --- a/src/components/molecules/card/base/withTheme.tsx +++ b/src/components/molecules/card/base/withTheme.tsx @@ -1,7 +1,6 @@ import React, { PropsWithChildren } from 'react'; import Card from '..'; - import WithCardTheme, { ExtendedCardTheme } from './withCardTheme'; interface Props { diff --git a/src/components/molecules/card/bibleBook.tsx b/src/components/molecules/card/bibleBook.tsx index 28f6c6641..ee1b2b4a1 100644 --- a/src/components/molecules/card/bibleBook.tsx +++ b/src/components/molecules/card/bibleBook.tsx @@ -3,17 +3,15 @@ import { useRouter } from 'next/router'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import { IBibleBook } from '@lib/api/bibleBrain'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import { IBibleBook } from '~lib/api/bibleBrain'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import BibleVersionTypeLockup from '../bibleVersionTypeLockup'; - -import styles from './bibleBook.module.scss'; - import Card from '.'; +import styles from './bibleBook.module.scss'; interface Props { book: IBibleBook; diff --git a/src/components/molecules/card/bibleChapter.tsx b/src/components/molecules/card/bibleChapter.tsx index 77af6a5a0..fc2d6efde 100644 --- a/src/components/molecules/card/bibleChapter.tsx +++ b/src/components/molecules/card/bibleChapter.tsx @@ -1,10 +1,9 @@ import React from 'react'; import TeaseRecording from '../teaseRecording'; - +import { CardRecordingFragment } from './__generated__/recording'; import CardWithTheme from './base/withTheme'; import CardHatBibleBook from './hat/bibleBook'; -import { CardRecordingFragment } from './__generated__/recording'; interface CardBibleChapterProps { recording: CardRecordingFragment; diff --git a/src/components/molecules/card/bibleVersion.tsx b/src/components/molecules/card/bibleVersion.tsx index 024abbdf3..635ada845 100644 --- a/src/components/molecules/card/bibleVersion.tsx +++ b/src/components/molecules/card/bibleVersion.tsx @@ -3,20 +3,18 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import { IBibleVersion } from '@lib/api/bibleBrain'; -import root from '@lib/routes'; -import useHover from '@lib/useHover'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import { IBibleVersion } from '~lib/api/bibleBrain'; +import root from '~lib/routes'; +import useHover from '~lib/useHover'; +import useLanguageRoute from '~lib/useLanguageRoute'; import BibleVersionTypeLockup from '../bibleVersionTypeLockup'; - +import Card from '.'; import CardBibleBook from './bibleBook'; import styles from './bibleVersion.module.scss'; -import Card from '.'; - interface Props { version: IBibleVersion; } diff --git a/src/components/molecules/card/collection.tsx b/src/components/molecules/card/collection.tsx index b623570d5..8c4c395ee 100644 --- a/src/components/molecules/card/collection.tsx +++ b/src/components/molecules/card/collection.tsx @@ -4,27 +4,26 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import ProgressBar from '@components/atoms/progressBar'; -import Card from '@components/molecules/card'; -import { useIsCollectionFavorited } from '@lib/api/useIsCollectionFavorited'; -import { BaseColors } from '@lib/constants'; -import { formatDateRange } from '@lib/date'; -import { useFormattedDuration } from '@lib/time'; -import useHover from '@lib/useHover'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import ProgressBar from '~components/atoms/progressBar'; +import Card from '~components/molecules/card'; +import { useIsCollectionFavorited } from '~lib/api/useIsCollectionFavorited'; +import { BaseColors } from '~lib/constants'; +import { formatDateRange } from '~lib/date'; +import { useFormattedDuration } from '~lib/time'; +import useHover from '~lib/useHover'; +import { CollectionContentType } from '~src/__generated__/graphql'; import SuccessIcon from '../../../../public/img/icons/icon-success-light.svg'; import ButtonFavorite from '../buttonFavorite'; import CollectionTypeLockup from '../collectionTypeLockup'; - -import styles from './collection.module.scss'; -import CardRecording from './recording'; -import CardSequence from './sequence'; -import { CollectionContentType } from '@src/__generated__/graphql'; import { CardCollectionFragment } from './__generated__/collection'; import { CardRecordingFragment } from './__generated__/recording'; import { CardSequenceFragment } from './__generated__/sequence'; +import styles from './collection.module.scss'; +import CardRecording from './recording'; +import CardSequence from './sequence'; interface CardCollectionProps { collection: CardCollectionFragment; diff --git a/src/components/molecules/card/favorite.tsx b/src/components/molecules/card/favorite.tsx index fb45f48b3..3d12fa7f0 100644 --- a/src/components/molecules/card/favorite.tsx +++ b/src/components/molecules/card/favorite.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import CardFavoriteEntity from './favoriteEntity'; import { CardFavoriteFragment } from './__generated__/favorite'; +import CardFavoriteEntity from './favoriteEntity'; interface CardEntityProps { favorite: CardFavoriteFragment; diff --git a/src/components/molecules/card/favoriteEntity.tsx b/src/components/molecules/card/favoriteEntity.tsx index ae3aae112..162cd6aa5 100644 --- a/src/components/molecules/card/favoriteEntity.tsx +++ b/src/components/molecules/card/favoriteEntity.tsx @@ -1,14 +1,14 @@ import React from 'react'; -import { UnreachableCaseError } from '@lib/typeHelpers'; +import { UnreachableCaseError } from '~lib/typeHelpers'; +import { CardFavoriteEntityFragment } from './__generated__/favoriteEntity'; import CardCollection from './collection'; import CardPerson from './person'; import CardRecording from './recording'; import CardRecordingStack from './recordingStack'; import CardSequence from './sequence'; import CardSponsor from './sponsor'; -import { CardFavoriteEntityFragment } from './__generated__/favoriteEntity'; interface CardEntityProps { entity: CardFavoriteEntityFragment; diff --git a/src/components/molecules/card/hat/audiobook.tsx b/src/components/molecules/card/hat/audiobook.tsx index a6b81bed2..20edb5b9c 100644 --- a/src/components/molecules/card/hat/audiobook.tsx +++ b/src/components/molecules/card/hat/audiobook.tsx @@ -1,18 +1,16 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import { BaseColors } from '@lib/constants'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import { BaseColors } from '~lib/constants'; import HatIcon from '../../../../../public/img/icons/fa-book-light.svg'; import PersonLockup from '../../personLockup'; +import { CardRecordingFragment } from '../__generated__/recording'; import CardRecordingSequenceHat from '../recordingSequenceHat'; - -import styles from './audiobook.module.scss'; - import CardHat from '.'; -import { CardRecordingFragment } from '../__generated__/recording'; +import styles from './audiobook.module.scss'; interface Props { sequence: NonNullable; diff --git a/src/components/molecules/card/hat/bibleBook.tsx b/src/components/molecules/card/hat/bibleBook.tsx index 1ffd35bde..3dae23ced 100644 --- a/src/components/molecules/card/hat/bibleBook.tsx +++ b/src/components/molecules/card/hat/bibleBook.tsx @@ -1,14 +1,12 @@ import React from 'react'; -import Heading2 from '@components/atoms/heading2'; +import Heading2 from '~components/atoms/heading2'; import HatIcon from '../../../../../public/img/icons/fa-book-light.svg'; +import { CardRecordingFragment } from '../__generated__/recording'; import CardRecordingSequenceHat from '../recordingSequenceHat'; - -import styles from './bibleBook.module.scss'; - import CardHat from '.'; -import { CardRecordingFragment } from '../__generated__/recording'; +import styles from './bibleBook.module.scss'; interface Props { sequence: NonNullable; diff --git a/src/components/molecules/card/hat/index.tsx b/src/components/molecules/card/hat/index.tsx index f6b73bce6..2d56be698 100644 --- a/src/components/molecules/card/hat/index.tsx +++ b/src/components/molecules/card/hat/index.tsx @@ -1,14 +1,12 @@ import clsx from 'clsx'; import Link from 'next/link'; import { useRouter } from 'next/router'; -import React, { PropsWithChildren } from 'react'; -import { useState } from 'react'; +import React, { PropsWithChildren, useState } from 'react'; -import Heading6 from '@components/atoms/heading6'; +import Heading6 from '~components/atoms/heading6'; import ClosureIcon from '../../../../../public/img/icons/icon-closure-slim.svg'; import DisclosureIcon from '../../../../../public/img/icons/icon-disclosure-slim.svg'; - import styles from './index.module.scss'; type SimpleProps = { diff --git a/src/components/molecules/card/hat/sermon.tsx b/src/components/molecules/card/hat/sermon.tsx index 6c0b5a0e4..d2ecf72a3 100644 --- a/src/components/molecules/card/hat/sermon.tsx +++ b/src/components/molecules/card/hat/sermon.tsx @@ -1,16 +1,14 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import RoundImage from '@components/atoms/roundImage'; +import Heading2 from '~components/atoms/heading2'; +import RoundImage from '~components/atoms/roundImage'; import HatIcon from '../../../../../public/img/icons/fa-list-alt.svg'; +import { CardRecordingFragment } from '../__generated__/recording'; import CardRecordingSequenceHat from '../recordingSequenceHat'; - -import styles from './sermon.module.scss'; - import CardHat from '.'; -import { CardRecordingFragment } from '../__generated__/recording'; +import styles from './sermon.module.scss'; interface Props { sequence: NonNullable; diff --git a/src/components/molecules/card/hat/song.tsx b/src/components/molecules/card/hat/song.tsx index 223131af2..ffb8ce9da 100644 --- a/src/components/molecules/card/hat/song.tsx +++ b/src/components/molecules/card/hat/song.tsx @@ -1,13 +1,12 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; +import Heading2 from '~components/atoms/heading2'; import HatIcon from '../../../../../public/img/icons/fa-music-light.svg'; +import { CardRecordingFragment } from '../__generated__/recording'; import CardRecordingSequenceHat from '../recordingSequenceHat'; - import CardHat from '.'; -import { CardRecordingFragment } from '../__generated__/recording'; interface Props { sequence: NonNullable; diff --git a/src/components/molecules/card/hat/sponsor.tsx b/src/components/molecules/card/hat/sponsor.tsx index 2666d91e6..f05d40d58 100644 --- a/src/components/molecules/card/hat/sponsor.tsx +++ b/src/components/molecules/card/hat/sponsor.tsx @@ -2,18 +2,16 @@ import { useRouter } from 'next/router'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import RoundImage from '@components/atoms/roundImage'; -import Button from '@components/molecules/button'; -import { useIsSponsorFavorited } from '@lib/api/useIsSponsorFavorited'; +import Heading2 from '~components/atoms/heading2'; +import RoundImage from '~components/atoms/roundImage'; +import Button from '~components/molecules/button'; +import { useIsSponsorFavorited } from '~lib/api/useIsSponsorFavorited'; import HatIcon from '../../../../../public/img/icons/fa-user-plus.svg'; import IconLike from '../../../../../public/img/icons/icon-like-light.svg'; - -import styles from './sponsor.module.scss'; - -import CardHat from '.'; import { CardRecordingFragment } from '../__generated__/recording'; +import CardHat from '.'; +import styles from './sponsor.module.scss'; interface Props { sponsor: NonNullable; diff --git a/src/components/molecules/card/hat/story.tsx b/src/components/molecules/card/hat/story.tsx index d0f027f08..fb89bfa96 100644 --- a/src/components/molecules/card/hat/story.tsx +++ b/src/components/molecules/card/hat/story.tsx @@ -1,16 +1,14 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import RoundImage from '@components/atoms/roundImage'; +import Heading2 from '~components/atoms/heading2'; +import RoundImage from '~components/atoms/roundImage'; import HatIcon from '../../../../../public/img/icons/fa-feather-light.svg'; +import { CardRecordingFragment } from '../__generated__/recording'; import CardRecordingSequenceHat from '../recordingSequenceHat'; - -import styles from './story.module.scss'; - import CardHat from '.'; -import { CardRecordingFragment } from '../__generated__/recording'; +import styles from './story.module.scss'; interface Props { sequence: NonNullable; diff --git a/src/components/molecules/card/index.tsx b/src/components/molecules/card/index.tsx index 087d3a45d..784bdbff5 100644 --- a/src/components/molecules/card/index.tsx +++ b/src/components/molecules/card/index.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx'; import React, { ReactNode } from 'react'; -import styles from '@components/molecules/card/index.module.scss'; +import styles from '~components/molecules/card/index.module.scss'; interface CardProps { children?: ReactNode; diff --git a/src/components/molecules/card/inferred.tsx b/src/components/molecules/card/inferred.tsx index 2345d63b0..a36c5d226 100644 --- a/src/components/molecules/card/inferred.tsx +++ b/src/components/molecules/card/inferred.tsx @@ -1,16 +1,18 @@ -import CardPerson from './person'; -import CardRecording from './recording'; -import CardSequence from './sequence'; -import CardCollection from './collection'; -import CardSponsor from './sponsor'; import React from 'react'; import { SetRequired } from 'type-fest'; -import { CollectionContentType } from '@src/__generated__/graphql'; + +import { CollectionContentType } from '~src/__generated__/graphql'; + import { CardCollectionFragment } from './__generated__/collection'; import { CardPersonFragment } from './__generated__/person'; import { CardRecordingFragment } from './__generated__/recording'; import { CardSequenceFragment } from './__generated__/sequence'; import { CardSponsorFragment } from './__generated__/sponsor'; +import CardCollection from './collection'; +import CardPerson from './person'; +import CardRecording from './recording'; +import CardSequence from './sequence'; +import CardSponsor from './sponsor'; type EntityUnion = | CardPersonFragment diff --git a/src/components/molecules/card/person.tsx b/src/components/molecules/card/person.tsx index 7a6f024d7..ea272406a 100644 --- a/src/components/molecules/card/person.tsx +++ b/src/components/molecules/card/person.tsx @@ -3,18 +3,17 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import RoundImage from '@components/atoms/roundImage'; -import Card from '@components/molecules/card'; -import { useIsPersonFavorited } from '@lib/api/useIsPersonFavorited'; -import { BaseColors } from '@lib/constants'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import RoundImage from '~components/atoms/roundImage'; +import Card from '~components/molecules/card'; +import { useIsPersonFavorited } from '~lib/api/useIsPersonFavorited'; +import { BaseColors } from '~lib/constants'; import ButtonFavorite from '../buttonFavorite'; import PersonTypeLockup from '../personTypeLockup'; - -import styles from './person.module.scss'; import { CardPersonFragment } from './__generated__/person'; +import styles from './person.module.scss'; interface CardCollectionProps { person: CardPersonFragment; diff --git a/src/components/molecules/card/playlist.tsx b/src/components/molecules/card/playlist.tsx index a7bbd5bf6..7ea9bd8e5 100644 --- a/src/components/molecules/card/playlist.tsx +++ b/src/components/molecules/card/playlist.tsx @@ -2,22 +2,20 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import { BaseColors } from '@lib/constants'; - -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import { BaseColors } from '~lib/constants'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import ListIcon from '../../../../public/img/icons/fa-list.svg'; import LikeActiveIcon from '../../../../public/img/icons/icon-like-active.svg'; import IconButton from '../iconButton'; import TeaseRecordingStack from '../teaseRecordingStack'; import TypeLockup from '../typeLockup'; - +import { CardPlaylistFragment } from './__generated__/playlist'; import CardWithTheme from './base/withTheme'; import styles from './playlist.module.scss'; -import { CardPlaylistFragment } from './__generated__/playlist'; interface Props { playlist: CardPlaylistFragment; diff --git a/src/components/molecules/card/playlistItem.tsx b/src/components/molecules/card/playlistItem.tsx index 592573b76..71523292e 100644 --- a/src/components/molecules/card/playlistItem.tsx +++ b/src/components/molecules/card/playlistItem.tsx @@ -1,9 +1,8 @@ import React from 'react'; import TeaseRecording from '../teaseRecording'; - -import CardWithTheme from './base/withTheme'; import { CardRecordingFragment } from './__generated__/recording'; +import CardWithTheme from './base/withTheme'; interface Props { recording: CardRecordingFragment; diff --git a/src/components/molecules/card/post.spec.tsx b/src/components/molecules/card/post.spec.tsx index 5e67b5dbf..5a0416487 100644 --- a/src/components/molecules/card/post.spec.tsx +++ b/src/components/molecules/card/post.spec.tsx @@ -1,5 +1,5 @@ -import CardPost from '@components/molecules/card/post'; -import { buildRenderer } from '@lib/test/buildRenderer'; +import CardPost from '~components/molecules/card/post'; +import { buildRenderer } from '~lib/test/buildRenderer'; const renderComponent = buildRenderer(CardPost); diff --git a/src/components/molecules/card/post.tsx b/src/components/molecules/card/post.tsx index bfdec33c2..0c076db35 100644 --- a/src/components/molecules/card/post.tsx +++ b/src/components/molecules/card/post.tsx @@ -4,19 +4,17 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import Card from '@components/molecules/card'; -import { BaseColors } from '@lib/constants'; -import { formatLongDate } from '@lib/date'; - -import { useFormattedDuration } from '@lib/time'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import Card from '~components/molecules/card'; +import { BaseColors } from '~lib/constants'; +import { formatLongDate } from '~lib/date'; +import { useFormattedDuration } from '~lib/time'; import IconAlignLeft from '../../../../public/img/icons/fa-align-left.svg'; import TypeLockup from '../typeLockup'; - -import styles from './post.module.scss'; import { CardPostFragment } from './__generated__/post'; +import styles from './post.module.scss'; interface CardPostProps { post: CardPostFragment; diff --git a/src/components/molecules/card/recording.tsx b/src/components/molecules/card/recording.tsx index e4e89aab3..124b52faf 100644 --- a/src/components/molecules/card/recording.tsx +++ b/src/components/molecules/card/recording.tsx @@ -1,14 +1,14 @@ import React from 'react'; -import { UnreachableCaseError } from '@lib/typeHelpers'; +import { UnreachableCaseError } from '~lib/typeHelpers'; +import { RecordingContentType } from '~src/__generated__/graphql'; +import { CardRecordingFragment } from './__generated__/recording'; import CardAudiobookTrack from './audiobookTrack'; import CardBibleChapter from './bibleChapter'; import CardSermon from './sermon'; import CardSong from './song'; import CardStory from './story'; -import { RecordingContentType } from '@src/__generated__/graphql'; -import { CardRecordingFragment } from './__generated__/recording'; interface CardSermonProps { recording: CardRecordingFragment; diff --git a/src/components/molecules/card/recordingSequenceHat.tsx b/src/components/molecules/card/recordingSequenceHat.tsx index 33c76f65a..77c570228 100644 --- a/src/components/molecules/card/recordingSequenceHat.tsx +++ b/src/components/molecules/card/recordingSequenceHat.tsx @@ -2,15 +2,14 @@ import { useRouter } from 'next/router'; import React, { PropsWithChildren } from 'react'; import { FormattedMessage } from 'react-intl'; -import { useIsSequenceFavorited } from '@lib/api/useIsSequenceFavorited'; -import { UnreachableCaseError } from '@lib/typeHelpers'; +import { useIsSequenceFavorited } from '~lib/api/useIsSequenceFavorited'; +import { UnreachableCaseError } from '~lib/typeHelpers'; +import { SequenceContentType } from '~src/__generated__/graphql'; import IconLike from '../../../../public/img/icons/icon-like-light.svg'; import Button from '../button'; - -import styles from './recordingSequenceHat.module.scss'; -import { SequenceContentType } from '@src/__generated__/graphql'; import { CardRecordingSequenceHatFragment } from './__generated__/recordingSequenceHat'; +import styles from './recordingSequenceHat.module.scss'; interface Props { sequence: NonNullable; diff --git a/src/components/molecules/card/recordingStack.tsx b/src/components/molecules/card/recordingStack.tsx index 40a861915..809ed8cc2 100644 --- a/src/components/molecules/card/recordingStack.tsx +++ b/src/components/molecules/card/recordingStack.tsx @@ -1,15 +1,15 @@ import React from 'react'; -import TeaseRecordingStack from '../teaseRecordingStack'; +import { SequenceContentType } from '~src/__generated__/graphql'; +import TeaseRecordingStack from '../teaseRecordingStack'; +import { CardRecordingStackFragment } from './__generated__/recordingStack'; import CardWithTheme from './base/withTheme'; import CardHatAudiobook from './hat/audiobook'; import CardHatBibleBook from './hat/bibleBook'; import CardHatSermon from './hat/sermon'; import CardHatSong from './hat/song'; import CardHatStory from './hat/story'; -import { SequenceContentType } from '@src/__generated__/graphql'; -import { CardRecordingStackFragment } from './__generated__/recordingStack'; export interface Props { sequence: CardRecordingStackFragment; diff --git a/src/components/molecules/card/sequence.tsx b/src/components/molecules/card/sequence.tsx index 6fb6ace1e..7be922c29 100644 --- a/src/components/molecules/card/sequence.tsx +++ b/src/components/molecules/card/sequence.tsx @@ -4,15 +4,16 @@ import { useRouter } from 'next/router'; import React, { useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import ProgressBar from '@components/atoms/progressBar'; -import Card from '@components/molecules/card'; -import { useIsSequenceFavorited } from '@lib/api/useIsSequenceFavorited'; -import { BaseColors } from '@lib/constants'; -import { getRecordingTypeTheme } from '@lib/getRecordingTheme'; -import { useFormattedDuration } from '@lib/time'; -import useHover from '@lib/useHover'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import ProgressBar from '~components/atoms/progressBar'; +import Card from '~components/molecules/card'; +import { useIsSequenceFavorited } from '~lib/api/useIsSequenceFavorited'; +import { BaseColors } from '~lib/constants'; +import { getRecordingTypeTheme } from '~lib/getRecordingTheme'; +import { useFormattedDuration } from '~lib/time'; +import useHover from '~lib/useHover'; +import { SequenceContentType } from '~src/__generated__/graphql'; import BookIcon from '../../../../public/img/icons/fa-book-light.svg'; import FeatherIcon from '../../../../public/img/icons/fa-feather-light.svg'; @@ -25,11 +26,9 @@ import ButtonFavorite from '../buttonFavorite'; import PersonLockup from '../personLockup'; import TeaseRecordingStack from '../teaseRecordingStack'; import TypeLockup from '../typeLockup'; - -import styles from './sequence.module.scss'; -import { SequenceContentType } from '@src/__generated__/graphql'; import { CardRecordingFragment } from './__generated__/recording'; import { CardSequenceFragment } from './__generated__/sequence'; +import styles from './sequence.module.scss'; interface CardCollectionProps { sequence: CardSequenceFragment; diff --git a/src/components/molecules/card/sermon.spec.tsx b/src/components/molecules/card/sermon.spec.tsx index 373b08f0e..08aee59eb 100644 --- a/src/components/molecules/card/sermon.spec.tsx +++ b/src/components/molecules/card/sermon.spec.tsx @@ -1,9 +1,9 @@ import { screen } from '@testing-library/react'; import React from 'react'; -import CardSermon, { CardSermonProps } from '@components/molecules/card/sermon'; -import AndMiniplayer from '@components/templates/andMiniplayer'; -import { buildRenderer } from '@lib/test/buildRenderer'; +import CardSermon, { CardSermonProps } from '~components/molecules/card/sermon'; +import AndMiniplayer from '~components/templates/andMiniplayer'; +import { buildRenderer } from '~lib/test/buildRenderer'; const Page = (props: CardSermonProps): JSX.Element => { return ( diff --git a/src/components/molecules/card/sermon.tsx b/src/components/molecules/card/sermon.tsx index 2a533e54b..22233d419 100644 --- a/src/components/molecules/card/sermon.tsx +++ b/src/components/molecules/card/sermon.tsx @@ -1,11 +1,10 @@ import React from 'react'; import TeaseRecording from '../teaseRecording'; - +import { CardRecordingFragment } from './__generated__/recording'; import CardWithTheme from './base/withTheme'; import CardHatSermon from './hat/sermon'; import CardHatSponsor from './hat/sponsor'; -import { CardRecordingFragment } from './__generated__/recording'; export interface CardSermonProps { recording: CardRecordingFragment; diff --git a/src/components/molecules/card/song.tsx b/src/components/molecules/card/song.tsx index dd5c6372b..46bb87641 100644 --- a/src/components/molecules/card/song.tsx +++ b/src/components/molecules/card/song.tsx @@ -1,10 +1,9 @@ import React from 'react'; import TeaseRecording from '../teaseRecording'; - +import { CardRecordingFragment } from './__generated__/recording'; import CardWithTheme from './base/withTheme'; import CardHatSong from './hat/song'; -import { CardRecordingFragment } from './__generated__/recording'; interface CardSongProps { song: CardRecordingFragment; diff --git a/src/components/molecules/card/songBook.tsx b/src/components/molecules/card/songBook.tsx index d692669a2..81a2313ed 100644 --- a/src/components/molecules/card/songBook.tsx +++ b/src/components/molecules/card/songBook.tsx @@ -4,19 +4,18 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import root from '@lib/routes'; -import useHover from '@lib/useHover'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import root from '~lib/routes'; +import useHover from '~lib/useHover'; +import useLanguageRoute from '~lib/useLanguageRoute'; +import { SequenceContentType } from '~src/__generated__/graphql'; import SequenceTypeLockup from '../sequenceTypeLockup'; import TeaseRecordingStack from '../teaseRecordingStack'; - +import { CardRecordingFragment } from './__generated__/recording'; import CardWithTheme from './base/withTheme'; import styles from './songBook.module.scss'; -import { SequenceContentType } from '@src/__generated__/graphql'; -import { CardRecordingFragment } from './__generated__/recording'; interface CardSongProps { book: string; diff --git a/src/components/molecules/card/sponsor.tsx b/src/components/molecules/card/sponsor.tsx index a331aa3c1..906794001 100644 --- a/src/components/molecules/card/sponsor.tsx +++ b/src/components/molecules/card/sponsor.tsx @@ -3,19 +3,18 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import RoundImage from '@components/atoms/roundImage'; -import Card from '@components/molecules/card'; -import { useIsSponsorFavorited } from '@lib/api/useIsSponsorFavorited'; -import { BaseColors } from '@lib/constants'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import RoundImage from '~components/atoms/roundImage'; +import Card from '~components/molecules/card'; +import { useIsSponsorFavorited } from '~lib/api/useIsSponsorFavorited'; +import { BaseColors } from '~lib/constants'; import UserPlusIcon from '../../../../public/img/icons/fa-user-plus.svg'; import ButtonFavorite from '../buttonFavorite'; import TypeLockup from '../typeLockup'; - -import styles from './sponsor.module.scss'; import { CardSponsorFragment } from './__generated__/sponsor'; +import styles from './sponsor.module.scss'; interface CardSponsorProps { sponsor: CardSponsorFragment; diff --git a/src/components/molecules/card/story.tsx b/src/components/molecules/card/story.tsx index dcb94b125..4f4e015a3 100644 --- a/src/components/molecules/card/story.tsx +++ b/src/components/molecules/card/story.tsx @@ -1,10 +1,9 @@ import React from 'react'; import TeaseRecording from '../teaseRecording'; - +import { CardRecordingFragment } from './__generated__/recording'; import CardWithTheme from './base/withTheme'; import CardHatStory from './hat/story'; -import { CardRecordingFragment } from './__generated__/recording'; interface CardStoryProps { story: CardRecordingFragment; diff --git a/src/components/molecules/card/topic.tsx b/src/components/molecules/card/topic.tsx index 4ac35aadb..0ed0d9a4e 100644 --- a/src/components/molecules/card/topic.tsx +++ b/src/components/molecules/card/topic.tsx @@ -2,10 +2,9 @@ import React from 'react'; import HatIcon from '../../../../public/img/icons/fa-layer-group.svg'; import TeaseRecording from '../teaseRecording'; - +import { CardRecordingFragment } from './__generated__/recording'; import CardWithTheme from './base/withTheme'; import CardHat from './hat'; -import { CardRecordingFragment } from './__generated__/recording'; interface CardTopicProps { topicRecording: CardRecordingFragment; diff --git a/src/components/molecules/cardGroup.tsx b/src/components/molecules/cardGroup.tsx index dd047fd24..5b2450499 100644 --- a/src/components/molecules/cardGroup.tsx +++ b/src/components/molecules/cardGroup.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx'; import React, { ReactNode } from 'react'; -import styles from '@components/molecules/cardGroup.module.scss'; +import styles from '~components/molecules/cardGroup.module.scss'; interface CardGroupProps { children?: ReactNode; diff --git a/src/components/molecules/cardMasonry.tsx b/src/components/molecules/cardMasonry.tsx index 3f7694ac6..28925506b 100644 --- a/src/components/molecules/cardMasonry.tsx +++ b/src/components/molecules/cardMasonry.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx'; import { MasonryProps } from 'masonic'; -import React from 'react'; import dynamic from 'next/dynamic'; +import React from 'react'; import styles from './cardMasonry.module.scss'; diff --git a/src/components/molecules/circleButton.tsx b/src/components/molecules/circleButton.tsx index a8030706f..276a552d1 100644 --- a/src/components/molecules/circleButton.tsx +++ b/src/components/molecules/circleButton.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx'; import React, { MouseEvent, PropsWithChildren, Ref } from 'react'; -import { BaseColors } from '@lib/constants'; +import { BaseColors } from '~lib/constants'; import styles from './circleButton.module.scss'; diff --git a/src/components/molecules/collectionTypeLockup.tsx b/src/components/molecules/collectionTypeLockup.tsx index 8aacaac47..eb0aa7958 100644 --- a/src/components/molecules/collectionTypeLockup.tsx +++ b/src/components/molecules/collectionTypeLockup.tsx @@ -1,13 +1,12 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import { BaseColors } from '@lib/constants'; +import { BaseColors } from '~lib/constants'; +import { CollectionContentType } from '~src/__generated__/graphql'; import BibleIcon from '../../../public/img/icons/fa-bible.svg'; import ListIcon from '../../../public/img/icons/fa-list.svg'; - import TypeLockup from './typeLockup'; -import { CollectionContentType } from '@src/__generated__/graphql'; type Props = { contentType: CollectionContentType; diff --git a/src/components/molecules/copyrightInfo.tsx b/src/components/molecules/copyrightInfo.tsx index 24a80ca6e..c6ad7b698 100644 --- a/src/components/molecules/copyrightInfo.tsx +++ b/src/components/molecules/copyrightInfo.tsx @@ -2,9 +2,10 @@ import clsx from 'clsx'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import styles from './copyrightInfo.module.scss'; +import { RecordingContentType } from '~src/__generated__/graphql'; + import { CopyrightInfoFragment } from './__generated__/copyrightInfo'; -import { RecordingContentType } from '@src/__generated__/graphql'; +import styles from './copyrightInfo.module.scss'; interface CopyrightInfoProps { recording: CopyrightInfoFragment; diff --git a/src/components/molecules/definitionList.tsx b/src/components/molecules/definitionList.tsx index 37a9585e5..7fc8941a7 100644 --- a/src/components/molecules/definitionList.tsx +++ b/src/components/molecules/definitionList.tsx @@ -1,11 +1,10 @@ import clsx from 'clsx'; import React from 'react'; -import Heading6 from '@components/atoms/heading6'; -import { BaseColors } from '@lib/constants'; +import Heading6 from '~components/atoms/heading6'; +import { BaseColors } from '~lib/constants'; import baseColorStyles from '../atoms/baseColors.module.scss'; - import styles from './definitionList.module.scss'; export type IDefinitionListTerm = { diff --git a/src/components/molecules/downloadAppButton.tsx b/src/components/molecules/downloadAppButton.tsx index dfed37ed3..25879cfa7 100644 --- a/src/components/molecules/downloadAppButton.tsx +++ b/src/components/molecules/downloadAppButton.tsx @@ -4,7 +4,6 @@ import { FormattedMessage } from 'react-intl'; import IconDisclosure from '../../../public/img/icons/icon-disclosure-light-small.svg'; import IconDownload from '../../../public/img/icons/icon-download-light.svg'; - import Button, { IButtonType } from './button'; import styles from './downloadAppButton.module.scss'; import Dropdown from './dropdown'; diff --git a/src/components/molecules/helpWidget.spec.tsx b/src/components/molecules/helpWidget.spec.tsx index 8ccc60458..3ec36a044 100644 --- a/src/components/molecules/helpWidget.spec.tsx +++ b/src/components/molecules/helpWidget.spec.tsx @@ -1,13 +1,13 @@ import { act, screen, waitFor } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; import { __loadRouter, __mockedRouter } from 'next/router'; import Script from 'next/script'; -import HelpWidget from '@components/molecules/helpWidget'; +import HelpWidget from '~components/molecules/helpWidget'; +import { buildLoader } from '~lib/test/buildLoader'; +import { buildRenderer } from '~lib/test/buildRenderer'; +import filterByExpectation from '~lib/test/getMatchingCall'; -import { buildRenderer } from '@lib/test/buildRenderer'; -import filterByExpectation from '@lib/test/getMatchingCall'; -import { buildLoader } from '@lib/test/buildLoader'; -import userEvent from '@testing-library/user-event'; import { GetHelpWidgetDataDocument } from './__generated__/helpWidget'; jest.mock('next/script'); diff --git a/src/components/molecules/helpWidget.tsx b/src/components/molecules/helpWidget.tsx index f9fe9fb2f..fbd03d48a 100644 --- a/src/components/molecules/helpWidget.tsx +++ b/src/components/molecules/helpWidget.tsx @@ -3,10 +3,9 @@ import Script from 'next/script'; import React, { useCallback, useEffect, useState } from 'react'; import { FormattedMessage } from 'react-intl'; -import Button from '@components/molecules/button'; - -import useHelpScoutLabels from '@lib/useHelpScoutLabels'; -import IconQuestionCircle from '@public/img/icons/icon-question-circle.svg'; +import Button from '~components/molecules/button'; +import useHelpScoutLabels from '~lib/useHelpScoutLabels'; +import IconQuestionCircle from '~public/img/icons/icon-question-circle.svg'; import { Beacon } from '../../types/window'; import { useGetHelpWidgetDataQuery } from './__generated__/helpWidget'; diff --git a/src/components/molecules/iconButton.tsx b/src/components/molecules/iconButton.tsx index 854f42f67..4f7da5158 100644 --- a/src/components/molecules/iconButton.tsx +++ b/src/components/molecules/iconButton.tsx @@ -1,9 +1,8 @@ import React, { Ref } from 'react'; -import { BaseColors } from '@lib/constants'; +import { BaseColors } from '~lib/constants'; import baseColorsStyles from '../atoms/baseColors.module.scss'; - import CircleButton, { ICircleButtonProps } from './circleButton'; type Props = { diff --git a/src/components/molecules/languageAlternativesAlert.tsx b/src/components/molecules/languageAlternativesAlert.tsx index 138b4e7ac..8174cd47d 100644 --- a/src/components/molecules/languageAlternativesAlert.tsx +++ b/src/components/molecules/languageAlternativesAlert.tsx @@ -3,10 +3,10 @@ import { Router, useRouter } from 'next/router'; import React, { useEffect, useMemo } from 'react'; import { FormattedMessage } from 'react-intl'; -import InfoBox from '@components/atoms/infoBox'; -import { getLanguageId, setLanguageId } from '@lib/cookies'; -import isServerSide from '@lib/isServerSide'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import InfoBox from '~components/atoms/infoBox'; +import { getLanguageId, setLanguageId } from '~lib/cookies'; +import isServerSide from '~lib/isServerSide'; +import useLanguageRoute from '~lib/useLanguageRoute'; import styles from './languageAlternativesAlert.module.scss'; import LanguageButton from './languageButton'; diff --git a/src/components/molecules/languageButton.tsx b/src/components/molecules/languageButton.tsx index 2d5c7bf27..b8deefb23 100644 --- a/src/components/molecules/languageButton.tsx +++ b/src/components/molecules/languageButton.tsx @@ -1,19 +1,17 @@ import clsx from 'clsx'; import React from 'react'; -import { LANGUAGES } from '@lib/constants'; - -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import getLanguageIds from '@lib/getLanguageIds'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import { LANGUAGES } from '~lib/constants'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import getLanguageIds from '~lib/getLanguageIds'; +import useLanguageRoute from '~lib/useLanguageRoute'; +import { Language } from '~src/__generated__/graphql'; import IconDisclosure from '../../../public/img/icons/icon-disclosure-light-small.svg'; import IconLanguage from '../../../public/img/icons/icon-language-light.svg'; - import Button, { IButtonType } from './button'; import Dropdown from './dropdown'; import styles from './languageButton.module.scss'; -import { Language } from '@src/__generated__/graphql'; type Props = { onClick: (baseUrl: string) => void; diff --git a/src/components/molecules/loadingIndicator.spec.tsx b/src/components/molecules/loadingIndicator.spec.tsx index 02ab379bb..77a342d5f 100644 --- a/src/components/molecules/loadingIndicator.spec.tsx +++ b/src/components/molecules/loadingIndicator.spec.tsx @@ -1,11 +1,11 @@ import { screen } from '@testing-library/react'; import React from 'react'; -import LoadingIndicator from '@components/molecules/loadingIndicator'; -import renderWithProviders from '@lib/test/renderWithProviders'; -import useRouterLoading from '@lib/useRouterLoading'; +import LoadingIndicator from '~components/molecules/loadingIndicator'; +import renderWithProviders from '~lib/test/renderWithProviders'; +import useRouterLoading from '~lib/useRouterLoading'; -jest.mock('@lib/useRouterLoading'); +jest.mock('~lib/useRouterLoading'); const mockUseRouterLoading = useRouterLoading as jest.Mock; diff --git a/src/components/molecules/loadingIndicator.tsx b/src/components/molecules/loadingIndicator.tsx index c23118f7f..d362c43ae 100644 --- a/src/components/molecules/loadingIndicator.tsx +++ b/src/components/molecules/loadingIndicator.tsx @@ -2,7 +2,7 @@ import clsx from 'clsx'; import React, { useEffect } from 'react'; import { useIsFetching } from 'react-query'; -import useRouterLoading from '@lib/useRouterLoading'; +import useRouterLoading from '~lib/useRouterLoading'; import styles from './loadingIndicator.module.scss'; diff --git a/src/components/molecules/login.spec.tsx b/src/components/molecules/login.spec.tsx index 0e83ebbda..bf84e0506 100644 --- a/src/components/molecules/login.spec.tsx +++ b/src/components/molecules/login.spec.tsx @@ -4,11 +4,11 @@ import { when } from 'jest-when'; import { __loadRouter } from 'next/router'; import React from 'react'; -import Login from '@components/molecules/login'; -import { fetchApi } from '@lib/api/fetchApi'; +import Login from '~components/molecules/login'; +import { fetchApi } from '~lib/api/fetchApi'; +import renderWithProviders from '~lib/test/renderWithProviders'; +import withMutedReactQueryLogger from '~lib/test/withMutedReactQueryLogger'; -import renderWithProviders from '@lib/test/renderWithProviders'; -import withMutedReactQueryLogger from '@lib/test/withMutedReactQueryLogger'; import { LoginForgotPasswordDocument } from './__generated__/login'; function loadForgotPasswordResponse({ diff --git a/src/components/molecules/login.tsx b/src/components/molecules/login.tsx index 99f5f1f50..b95e87338 100644 --- a/src/components/molecules/login.tsx +++ b/src/components/molecules/login.tsx @@ -1,9 +1,9 @@ import { useRouter } from 'next/router'; import React from 'react'; -import AndOnboarding from '@components/templates/andOnboarding'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import AndOnboarding from '~components/templates/andOnboarding'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import LoginForm from './loginForm'; import SocialLogin from './socialLogin'; diff --git a/src/components/molecules/loginForm.tsx b/src/components/molecules/loginForm.tsx index 2f6a78d95..e5c5efbd0 100644 --- a/src/components/molecules/loginForm.tsx +++ b/src/components/molecules/loginForm.tsx @@ -3,15 +3,15 @@ import React, { FormEvent, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; import { useQueryClient } from 'react-query'; -import Alert from '@components/atoms/alert'; -import Modal from '@components/organisms/modal'; -import { login, refetchUserQueries } from '@lib/api/login'; +import Alert from '~components/atoms/alert'; +import Modal from '~components/organisms/modal'; +import { login, refetchUserQueries } from '~lib/api/login'; +import { useLoginForgotPasswordMutation } from './__generated__/login'; import Button from './button'; import ButtonGuest from './buttonGuest'; import Input from './form/input'; import styles from './loginForm.module.scss'; -import { useLoginForgotPasswordMutation } from './__generated__/login'; type Props = { showRegister: () => void; diff --git a/src/components/molecules/mediaFormatSwitcher.tsx b/src/components/molecules/mediaFormatSwitcher.tsx index f653f2a59..8e33541fa 100644 --- a/src/components/molecules/mediaFormatSwitcher.tsx +++ b/src/components/molecules/mediaFormatSwitcher.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import hasVideo from '@lib/hasVideo'; -import usePlaybackSession from '@lib/usePlaybackSession'; +import hasVideo from '~lib/hasVideo'; +import usePlaybackSession from '~lib/usePlaybackSession'; -import styles from './mediaFormatSwitcher.module.scss'; import { PlayerFragment } from './__generated__/player'; +import styles from './mediaFormatSwitcher.module.scss'; export default function MediaFormatSwitcher({ recording, diff --git a/src/components/molecules/namedAvatar.tsx b/src/components/molecules/namedAvatar.tsx index baf9240cb..826fe7759 100644 --- a/src/components/molecules/namedAvatar.tsx +++ b/src/components/molecules/namedAvatar.tsx @@ -1,11 +1,10 @@ import clsx from 'clsx'; import React from 'react'; -import RoundImage from '@components/atoms/roundImage'; -import { BaseColors } from '@lib/constants'; +import RoundImage from '~components/atoms/roundImage'; +import { BaseColors } from '~lib/constants'; import baseColorStyles from '../atoms/baseColors.module.scss'; - import LinkButton, { ILinkButtonProps } from './linkButton'; import styles from './namedAvatar.module.scss'; diff --git a/src/components/molecules/navItem.tsx b/src/components/molecules/navItem.tsx index fc075832d..dc11e888b 100644 --- a/src/components/molecules/navItem.tsx +++ b/src/components/molecules/navItem.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import ActiveLink from '@components/atoms/activeLink'; +import ActiveLink from '~components/atoms/activeLink'; // TODO: Split into its own SCSS module -import styles from '@components/organisms/navigation.module.scss'; -import { INavigationItem } from '@lib/useNavigationItems'; +import styles from '~components/organisms/navigation.module.scss'; +import { INavigationItem } from '~lib/useNavigationItems'; import IconDisclosure from '../../../public/img/icons/icon-disclosure-light-small.svg'; diff --git a/src/components/molecules/pagination.spec.tsx b/src/components/molecules/pagination.spec.tsx index 8917e538e..e0254d215 100644 --- a/src/components/molecules/pagination.spec.tsx +++ b/src/components/molecules/pagination.spec.tsx @@ -2,7 +2,7 @@ import { RenderOptions, RenderResult, screen } from '@testing-library/react'; import React, { ReactElement } from 'react'; import { QueryClient } from 'react-query'; -import renderWithProviders from '@lib/test/renderWithProviders'; +import renderWithProviders from '~lib/test/renderWithProviders'; import Pagination, { pagination } from './pagination'; diff --git a/src/components/molecules/pagination.tsx b/src/components/molecules/pagination.tsx index 3965d83a2..9eefda51a 100644 --- a/src/components/molecules/pagination.tsx +++ b/src/components/molecules/pagination.tsx @@ -3,11 +3,10 @@ import Link from 'next/link'; import React from 'react'; import { useIntl } from 'react-intl'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import useLanguageRoute from '~lib/useLanguageRoute'; import IconBack from '../../../public/img/icons/icon-back-light.svg'; import IconForward from '../../../public/img/icons/icon-forward-light.svg'; - import Button from './button'; import styles from './pagination.module.scss'; diff --git a/src/components/molecules/personLockup.tsx b/src/components/molecules/personLockup.tsx index 36592d066..763e5cf35 100644 --- a/src/components/molecules/personLockup.tsx +++ b/src/components/molecules/personLockup.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import NamedAvatar, { INamedAvatarProps } from './namedAvatar'; import { PersonLockupFragment } from './__generated__/personLockup'; +import NamedAvatar, { INamedAvatarProps } from './namedAvatar'; type Props = { person: PersonLockupFragment; diff --git a/src/components/molecules/personTypeLockup.tsx b/src/components/molecules/personTypeLockup.tsx index cec270d48..a9d3f41f5 100644 --- a/src/components/molecules/personTypeLockup.tsx +++ b/src/components/molecules/personTypeLockup.tsx @@ -1,10 +1,9 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import { BaseColors } from '@lib/constants'; +import { BaseColors } from '~lib/constants'; import UserIcon from '../../../public/img/icons/fa-user.svg'; - import TypeLockup from './typeLockup'; export default function PersonTypeLockup(): JSX.Element { diff --git a/src/components/molecules/playbackTimes.tsx b/src/components/molecules/playbackTimes.tsx index 634cd819e..c79a3d516 100644 --- a/src/components/molecules/playbackTimes.tsx +++ b/src/components/molecules/playbackTimes.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { useFormattedTime } from '@lib/time'; -import usePlaybackSession from '@lib/usePlaybackSession'; +import { useFormattedTime } from '~lib/time'; +import usePlaybackSession from '~lib/usePlaybackSession'; -import styles from './playbackTimes.module.scss'; import { PlayerFragment } from './__generated__/player'; +import styles from './playbackTimes.module.scss'; export default function PlaybackTimes({ recording, diff --git a/src/components/molecules/player.spec.tsx b/src/components/molecules/player.spec.tsx index 284f10ec1..b0c866e62 100644 --- a/src/components/molecules/player.spec.tsx +++ b/src/components/molecules/player.spec.tsx @@ -14,20 +14,20 @@ import React from 'react'; import ReactTestUtils from 'react-dom/test-utils'; import videojs from 'video.js'; -import Player, { PlayerProps } from '@components/molecules/player'; -import AndMiniplayer from '@components/templates/andMiniplayer'; -import AndPlaybackContext from '@components/templates/andPlaybackContext'; -import { recordingIsFavorited } from '@lib/api/recordingIsFavorited'; -import { BaseColors } from '@lib/constants'; - -import { buildRenderer } from '@lib/test/buildRenderer'; -import renderWithProviders from '@lib/test/renderWithProviders'; -import setPlayerMock, { mockVideojs } from '@lib/test/setPlayerMock'; +import Player, { PlayerProps } from '~components/molecules/player'; +import AndMiniplayer from '~components/templates/andMiniplayer'; +import AndPlaybackContext from '~components/templates/andPlaybackContext'; +import { recordingIsFavorited } from '~lib/api/recordingIsFavorited'; +import { BaseColors } from '~lib/constants'; +import { buildRenderer } from '~lib/test/buildRenderer'; +import renderWithProviders from '~lib/test/renderWithProviders'; +import setPlayerMock, { mockVideojs } from '~lib/test/setPlayerMock'; +import { SequenceContentType } from '~src/__generated__/graphql'; + import { PlayerFragment } from './__generated__/player'; -import { SequenceContentType } from '@src/__generated__/graphql'; jest.mock('video.js'); -jest.mock('@lib/api/recordingIsFavorited'); +jest.mock('~lib/api/recordingIsFavorited'); const mockRecordingIsFavorited = recordingIsFavorited as jest.Mock; diff --git a/src/components/molecules/player.tsx b/src/components/molecules/player.tsx index 712186bcb..094ef0433 100644 --- a/src/components/molecules/player.tsx +++ b/src/components/molecules/player.tsx @@ -3,32 +3,30 @@ import Image from 'next/legacy/image'; import React, { useEffect, useState } from 'react'; import { useIntl } from 'react-intl'; -import ButtonDownload from '@components/molecules/buttonDownload'; -import ButtonNudge from '@components/molecules/buttonNudge'; +import ButtonDownload from '~components/molecules/buttonDownload'; +import ButtonNudge from '~components/molecules/buttonNudge'; import ButtonPlay, { isBackgroundColorDark, -} from '@components/molecules/buttonPlay'; -import ButtonShareRecording from '@components/molecules/buttonShareRecording'; -import ButtonSpeed from '@components/molecules/buttonSpeed'; -import PlaybackTimes from '@components/molecules/playbackTimes'; -import RecordingProgressBar from '@components/molecules/recordingProgressBar'; -import { BaseColors } from '@lib/constants'; - -import hasVideo from '@lib/hasVideo'; -import useGlobalSpaceDown from '@lib/useGlobalSpaceDown'; -import usePlaybackSession from '@lib/usePlaybackSession'; +} from '~components/molecules/buttonPlay'; +import ButtonShareRecording from '~components/molecules/buttonShareRecording'; +import ButtonSpeed from '~components/molecules/buttonSpeed'; +import PlaybackTimes from '~components/molecules/playbackTimes'; +import RecordingProgressBar from '~components/molecules/recordingProgressBar'; +import { AndMiniplayerFragment } from '~components/templates/__generated__/andMiniplayer'; +import { BaseColors } from '~lib/constants'; +import hasVideo from '~lib/hasVideo'; +import useGlobalSpaceDown from '~lib/useGlobalSpaceDown'; +import usePlaybackSession from '~lib/usePlaybackSession'; import IconAirPlayAudio from '../../../public/img/icon-airplay-audio.svg'; import IconChromeCast from '../../../public/img/icon-chromecast.svg'; import IconFullscreen from '../../../public/img/icons/icon-fullscreen.svg'; import IconPause from '../../../public/img/icons/icon-pause-large.svg'; import IconPlay from '../../../public/img/icons/icon-play-large.svg'; - +import { PlayerFragment } from './__generated__/player'; import CircleButton from './circleButton'; import styles from './player.module.scss'; import RecordingButtonFavorite from './recordingButtonFavorite'; -import { AndMiniplayerFragment } from '@components/templates/__generated__/andMiniplayer'; -import { PlayerFragment } from './__generated__/player'; export interface PlayerProps { recording: PlayerFragment; diff --git a/src/components/molecules/recordingButtonFavorite.spec.tsx b/src/components/molecules/recordingButtonFavorite.spec.tsx index 194210872..fb88a9876 100644 --- a/src/components/molecules/recordingButtonFavorite.spec.tsx +++ b/src/components/molecules/recordingButtonFavorite.spec.tsx @@ -4,16 +4,16 @@ import Cookie from 'js-cookie'; import { __loadRouter } from 'next/router'; import React from 'react'; -import RecordingButtonFavorite from '@components/molecules/recordingButtonFavorite'; -import { recordingIsFavorited } from '@lib/api/recordingIsFavorited'; -import { setRecordingFavorited } from '@lib/api/setRecordingFavorited'; -import { BaseColors } from '@lib/constants'; -import renderWithProviders from '@lib/test/renderWithProviders'; -import withMutedReactQueryLogger from '@lib/test/withMutedReactQueryLogger'; -import loadControlledPromise from '@lib/test/loadControlledPromise'; - -jest.mock('@lib/api/recordingIsFavorited'); -jest.mock('@lib/api/setRecordingFavorited'); +import RecordingButtonFavorite from '~components/molecules/recordingButtonFavorite'; +import { recordingIsFavorited } from '~lib/api/recordingIsFavorited'; +import { setRecordingFavorited } from '~lib/api/setRecordingFavorited'; +import { BaseColors } from '~lib/constants'; +import loadControlledPromise from '~lib/test/loadControlledPromise'; +import renderWithProviders from '~lib/test/renderWithProviders'; +import withMutedReactQueryLogger from '~lib/test/withMutedReactQueryLogger'; + +jest.mock('~lib/api/recordingIsFavorited'); +jest.mock('~lib/api/setRecordingFavorited'); jest.mock('js-cookie'); const renderComponent = async () => { diff --git a/src/components/molecules/recordingButtonFavorite.tsx b/src/components/molecules/recordingButtonFavorite.tsx index 882f218f8..dd8e7f20f 100644 --- a/src/components/molecules/recordingButtonFavorite.tsx +++ b/src/components/molecules/recordingButtonFavorite.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { useIsRecordingFavorited } from '@lib/api/useIsRecordingFavorited'; -import { BaseColors } from '@lib/constants'; +import { useIsRecordingFavorited } from '~lib/api/useIsRecordingFavorited'; +import { BaseColors } from '~lib/constants'; +import { Scalars } from '~src/__generated__/graphql'; import ButtonFavorite from './buttonFavorite'; -import { Scalars } from '@src/__generated__/graphql'; export default function RecordingButtonFavorite({ id, diff --git a/src/components/molecules/recordingHasVideoFilter.tsx b/src/components/molecules/recordingHasVideoFilter.tsx index 055ca86ab..5b56ef723 100644 --- a/src/components/molecules/recordingHasVideoFilter.tsx +++ b/src/components/molecules/recordingHasVideoFilter.tsx @@ -3,12 +3,11 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Button from '@components/molecules/button'; -import Dropdown from '@components/molecules/dropdown'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Button from '~components/molecules/button'; +import Dropdown from '~components/molecules/dropdown'; +import useLanguageRoute from '~lib/useLanguageRoute'; import IconFilter from '../../../public/img/icons/icon-filter-light.svg'; - import styles from './recordingHasVideoFilter.module.scss'; type Props = { diff --git a/src/components/molecules/recordingProgressBar.tsx b/src/components/molecules/recordingProgressBar.tsx index 770d93445..b585e02f4 100644 --- a/src/components/molecules/recordingProgressBar.tsx +++ b/src/components/molecules/recordingProgressBar.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import usePlaybackSession from '@lib/usePlaybackSession'; +import { AndMiniplayerFragment } from '~components/templates/__generated__/andMiniplayer'; +import usePlaybackSession from '~lib/usePlaybackSession'; import ProgressBar from '../atoms/progressBar'; -import { AndMiniplayerFragment } from '@components/templates/__generated__/andMiniplayer'; interface ProgressBarProps { recording: AndMiniplayerFragment; diff --git a/src/components/molecules/searchBar.tsx b/src/components/molecules/searchBar.tsx index 5af27d25f..37cf14f1e 100644 --- a/src/components/molecules/searchBar.tsx +++ b/src/components/molecules/searchBar.tsx @@ -1,10 +1,12 @@ -import { - EntityFilterId, - filters, -} from '@components/organisms/searchResults.filters'; import clsx from 'clsx'; import React, { useCallback, useEffect, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; + +import { + EntityFilterId, + filters, +} from '~components/organisms/searchResults.filters'; + import IconExit from '../../../public/img/icons/icon-exit.svg'; import IconSearch from '../../../public/img/icons/icon-search.svg'; import Mininav from './mininav'; diff --git a/src/components/molecules/sequenceNav.tsx b/src/components/molecules/sequenceNav.tsx index be4adcead..e825ee1c8 100644 --- a/src/components/molecules/sequenceNav.tsx +++ b/src/components/molecules/sequenceNav.tsx @@ -3,10 +3,9 @@ import { useIntl } from 'react-intl'; import IconBack from '../../../public/img/icons/icon-back-light.svg'; import IconForward from '../../../public/img/icons/icon-forward-light.svg'; - +import { SequenceNavFragment } from './__generated__/sequenceNav'; import Button from './button'; import styles from './sequenceNav.module.scss'; -import { SequenceNavFragment } from './__generated__/sequenceNav'; export default function SequenceNav({ recording: { sequencePreviousRecording, sequenceNextRecording }, diff --git a/src/components/molecules/sequenceTypeLockup.tsx b/src/components/molecules/sequenceTypeLockup.tsx index 5cfea8cb3..82a6cf1d5 100644 --- a/src/components/molecules/sequenceTypeLockup.tsx +++ b/src/components/molecules/sequenceTypeLockup.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import { getSequenceTypeTheme } from '@lib/getSequenceType'; +import { getSequenceTypeTheme } from '~lib/getSequenceType'; +import { SequenceContentType } from '~src/__generated__/graphql'; import TypeLockup from './typeLockup'; -import { SequenceContentType } from '@src/__generated__/graphql'; type Props = { contentType: SequenceContentType; diff --git a/src/components/molecules/socialLogin.spec.tsx b/src/components/molecules/socialLogin.spec.tsx index ef1ba6a16..7896aec46 100644 --- a/src/components/molecules/socialLogin.spec.tsx +++ b/src/components/molecules/socialLogin.spec.tsx @@ -3,11 +3,10 @@ import userEvent from '@testing-library/user-event'; import { when } from 'jest-when'; import React from 'react'; -import SocialLogin from '@components/molecules/socialLogin'; -import { fetchApi } from '@lib/api/fetchApi'; - -import renderWithProviders from '@lib/test/renderWithProviders'; -import { RegisterSocialDocument } from '@containers/account/__generated__/register'; +import SocialLogin from '~components/molecules/socialLogin'; +import { RegisterSocialDocument } from '~containers/account/__generated__/register'; +import { fetchApi } from '~lib/api/fetchApi'; +import renderWithProviders from '~lib/test/renderWithProviders'; describe('social login', () => { it('does not run onSuccess callback if errors', async () => { diff --git a/src/components/molecules/socialLogin.tsx b/src/components/molecules/socialLogin.tsx index 0a83de26f..75b2339ca 100644 --- a/src/components/molecules/socialLogin.tsx +++ b/src/components/molecules/socialLogin.tsx @@ -1,19 +1,21 @@ import React, { useState } from 'react'; +import { + ReactFacebookFailureResponse, + ReactFacebookLoginInfo, +} from 'react-facebook-login'; import FacebookLogin from 'react-facebook-login/dist/facebook-login-render-props'; import { useGoogleLogin } from 'react-google-login'; import { FormattedMessage, useIntl } from 'react-intl'; import { useQueryClient } from 'react-query'; -import { FACEBOOK_APP_ID, GOOGLE_CLIENT_ID } from '@lib/constants'; -import { setSessionToken } from '@lib/cookies'; -import useDidUnmount from '@lib/useDidUnmount'; + +import { useRegisterSocialMutation } from '~containers/account/__generated__/register'; +import { FACEBOOK_APP_ID, GOOGLE_CLIENT_ID } from '~lib/constants'; +import { setSessionToken } from '~lib/cookies'; +import useDidUnmount from '~lib/useDidUnmount'; +import { UserSocialServiceName } from '~src/__generated__/graphql'; + import Button from './button'; import styles from './socialLogin.module.scss'; -import { - ReactFacebookFailureResponse, - ReactFacebookLoginInfo, -} from 'react-facebook-login'; -import { useRegisterSocialMutation } from '@containers/account/__generated__/register'; -import { UserSocialServiceName } from '@src/__generated__/graphql'; export default function SocialLogin({ isRegister, diff --git a/src/components/molecules/sponsorLockup.tsx b/src/components/molecules/sponsorLockup.tsx index 75682d64b..008449239 100644 --- a/src/components/molecules/sponsorLockup.tsx +++ b/src/components/molecules/sponsorLockup.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import NamedAvatar, { INamedAvatarProps } from './namedAvatar'; import { SponsorLockupFragment } from './__generated__/sponsorLockup'; +import NamedAvatar, { INamedAvatarProps } from './namedAvatar'; type Props = { sponsor: SponsorLockupFragment; diff --git a/src/components/molecules/sponsorTypeLockup.tsx b/src/components/molecules/sponsorTypeLockup.tsx index f30d5238d..d2a08c1c0 100644 --- a/src/components/molecules/sponsorTypeLockup.tsx +++ b/src/components/molecules/sponsorTypeLockup.tsx @@ -1,10 +1,9 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import { BaseColors } from '@lib/constants'; +import { BaseColors } from '~lib/constants'; import UserPlusIcon from '../../../public/img/icons/fa-user-plus.svg'; - import TypeLockup from './typeLockup'; export default function SponsorTypeLockup(): JSX.Element { diff --git a/src/components/molecules/tease.tsx b/src/components/molecules/tease.tsx index 21380dcaf..62b561b33 100644 --- a/src/components/molecules/tease.tsx +++ b/src/components/molecules/tease.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx'; import React, { ReactNode } from 'react'; -import styles from '@components/molecules/tease.module.scss'; +import styles from '~components/molecules/tease.module.scss'; interface TeaseProps { children?: ReactNode; diff --git a/src/components/molecules/teaseRecording.tsx b/src/components/molecules/teaseRecording.tsx index b3b357511..f2a214333 100644 --- a/src/components/molecules/teaseRecording.tsx +++ b/src/components/molecules/teaseRecording.tsx @@ -4,29 +4,28 @@ import { useRouter } from 'next/router'; import React, { useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading3 from '@components/atoms/heading3'; -import Heading6 from '@components/atoms/heading6'; -import ProgressBar from '@components/atoms/progressBar'; -import { useIsRecordingFavorited } from '@lib/api/useIsRecordingFavorited'; -import { BaseColors } from '@lib/constants'; -import { useFormattedDuration } from '@lib/time'; -import usePlaybackSession from '@lib/usePlaybackSession'; +import Heading2 from '~components/atoms/heading2'; +import Heading3 from '~components/atoms/heading3'; +import Heading6 from '~components/atoms/heading6'; +import ProgressBar from '~components/atoms/progressBar'; +import { AndMiniplayerFragment } from '~components/templates/__generated__/andMiniplayer'; +import { useIsRecordingFavorited } from '~lib/api/useIsRecordingFavorited'; +import { BaseColors } from '~lib/constants'; +import { useFormattedDuration } from '~lib/time'; +import usePlaybackSession from '~lib/usePlaybackSession'; +import { RecordingContentType } from '~src/__generated__/graphql'; import IconClosure from '../../../public/img/icons/icon-closure.svg'; import IconDisclosure from '../../../public/img/icons/icon-disclosure.svg'; import IconListeningAnimated from '../../../public/img/icons/icon-listening-animated.svg'; import IconPlay from '../../../public/img/icons/icon-play.svg'; import SuccessIcon from '../../../public/img/icons/icon-success-light.svg'; - +import { TeaseRecordingFragment } from './__generated__/teaseRecording'; import ButtonFavorite from './buttonFavorite'; import { CardTheme } from './card/base/withCardTheme'; import IconButton from './iconButton'; import PersonLockup from './personLockup'; import styles from './teaseRecording.module.scss'; -import { AndMiniplayerFragment } from '@components/templates/__generated__/andMiniplayer'; -import { RecordingContentType } from '@src/__generated__/graphql'; -import { TeaseRecordingFragment } from './__generated__/teaseRecording'; const isThemeDark = (theme: CardTheme): boolean => ['audiobookTrack', 'story', 'topic'].includes(theme); diff --git a/src/components/molecules/teaseRecordingStack.tsx b/src/components/molecules/teaseRecordingStack.tsx index fbb4edd0e..4a27cf894 100644 --- a/src/components/molecules/teaseRecordingStack.tsx +++ b/src/components/molecules/teaseRecordingStack.tsx @@ -1,11 +1,11 @@ import clsx from 'clsx'; import React from 'react'; -import TeaseRecording from '@components/molecules/teaseRecording'; +import TeaseRecording from '~components/molecules/teaseRecording'; +import { TeaseRecordingFragment } from './__generated__/teaseRecording'; import WithCardTheme, { CardTheme } from './card/base/withCardTheme'; import styles from './teaseRecordingStack.module.scss'; -import { TeaseRecordingFragment } from './__generated__/teaseRecording'; interface Props { recordings: TeaseRecordingFragment[]; diff --git a/src/components/molecules/transcript.tsx b/src/components/molecules/transcript.tsx index 9e987b1b7..d64817688 100644 --- a/src/components/molecules/transcript.tsx +++ b/src/components/molecules/transcript.tsx @@ -2,10 +2,10 @@ import clsx from 'clsx'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Alert from '@components/atoms/alert'; +import Alert from '~components/atoms/alert'; +import { RecordingContentType } from '~src/__generated__/graphql'; import styles from './transcript.module.scss'; -import { RecordingContentType } from '@src/__generated__/graphql'; // @see https://stackoverflow.com/a/37400795/168581 function splitText(text: string): string[] { diff --git a/src/components/molecules/typeLockup.tsx b/src/components/molecules/typeLockup.tsx index fc7e398eb..3c0f6d3ae 100644 --- a/src/components/molecules/typeLockup.tsx +++ b/src/components/molecules/typeLockup.tsx @@ -1,11 +1,10 @@ import clsx from 'clsx'; import React from 'react'; -import Heading6 from '@components/atoms/heading6'; -import { BaseColors } from '@lib/constants'; +import Heading6 from '~components/atoms/heading6'; +import { BaseColors } from '~lib/constants'; import baseColorStyles from '../atoms/baseColors.module.scss'; - import styles from './typeLockup.module.scss'; type Props = { diff --git a/src/components/organisms/__generated__/notFound.ts b/src/components/organisms/__generated__/notFound.ts index 50781809a..fc0c42f33 100644 --- a/src/components/organisms/__generated__/notFound.ts +++ b/src/components/organisms/__generated__/notFound.ts @@ -7,7 +7,7 @@ import { CardHatSponsorFragmentDoc } from '../../molecules/card/hat/__generated_ import { TeaseRecordingFragmentDoc } from '../../molecules/__generated__/teaseRecording'; import { AndMiniplayerFragmentDoc } from '../../templates/__generated__/andMiniplayer'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetNotFoundPageDataQueryVariables = Types.Exact<{ [key: string]: never; }>; @@ -40,7 +40,7 @@ export const useGetNotFoundPageDataQuery = < graphqlFetcher(GetNotFoundPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getNotFoundPageData( variables: ExactAlt diff --git a/src/components/organisms/__generated__/searchResults.ts b/src/components/organisms/__generated__/searchResults.ts index 92e577a51..cb261de60 100644 --- a/src/components/organisms/__generated__/searchResults.ts +++ b/src/components/organisms/__generated__/searchResults.ts @@ -11,7 +11,7 @@ import { CardCollectionFragmentDoc } from '../../molecules/card/__generated__/co import { CardSponsorFragmentDoc } from '../../molecules/card/__generated__/sponsor'; import { CardPersonFragmentDoc } from '../../molecules/card/__generated__/person'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSearchRecordingsQueryVariables = Types.Exact<{ language: Types.Language; term: Types.Scalars['String']; @@ -329,7 +329,7 @@ export const useGetSearchStoryProgramsQuery = < graphqlFetcher(GetSearchStoryProgramsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSearchRecordings( variables: ExactAlt diff --git a/src/components/organisms/aboutNav.tsx b/src/components/organisms/aboutNav.tsx index eac5dcbdd..bd66fef27 100644 --- a/src/components/organisms/aboutNav.tsx +++ b/src/components/organisms/aboutNav.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import Mininav from '@components/molecules/mininav'; -import { useNavigationItems } from '@lib/useNavigationItems'; +import Mininav from '~components/molecules/mininav'; +import { useNavigationItems } from '~lib/useNavigationItems'; import styles from './aboutNav.module.scss'; diff --git a/src/components/organisms/accountNav.tsx b/src/components/organisms/accountNav.tsx index 966479936..94b23d3f9 100644 --- a/src/components/organisms/accountNav.tsx +++ b/src/components/organisms/accountNav.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Mininav from '@components/molecules/mininav'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Mininav from '~components/molecules/mininav'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; type Props = { current: 'profile' | 'preferences'; diff --git a/src/components/organisms/drawer.tsx b/src/components/organisms/drawer.tsx index 93ee30f77..0f18ade19 100644 --- a/src/components/organisms/drawer.tsx +++ b/src/components/organisms/drawer.tsx @@ -1,11 +1,11 @@ import clsx from 'clsx'; +import { Router } from 'next/router'; import React, { useEffect } from 'react'; -import Header from '@components/organisms/header'; -import Navigation from '@components/organisms/navigation'; +import Header from '~components/organisms/header'; +import Navigation from '~components/organisms/navigation'; import styles from './drawer.module.scss'; -import { Router } from 'next/router'; export default function Drawer({ showingMenu, diff --git a/src/components/organisms/emptyState.tsx b/src/components/organisms/emptyState.tsx index bb0ab8a32..632f2312d 100644 --- a/src/components/organisms/emptyState.tsx +++ b/src/components/organisms/emptyState.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Alert from '@components/atoms/alert'; -import Heading2 from '@components/atoms/heading2'; -import Button from '@components/molecules/button'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Alert from '~components/atoms/alert'; +import Heading2 from '~components/atoms/heading2'; +import Button from '~components/molecules/button'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import styles from './emptyState.module.scss'; diff --git a/src/components/organisms/footer.tsx b/src/components/organisms/footer.tsx index 13221dda8..500aed867 100644 --- a/src/components/organisms/footer.tsx +++ b/src/components/organisms/footer.tsx @@ -1,11 +1,12 @@ -import Heading3 from '@components/atoms/heading3'; -import { FormattedMessage } from 'react-intl'; import Image from 'next/legacy/image'; -import { useEffect, useRef } from 'react'; -import isServerSide from '@lib/isServerSide'; -import React from 'react'; -import styles from './footer.module.scss'; import { useRouter } from 'next/router'; +import React, { useEffect, useRef } from 'react'; +import { FormattedMessage } from 'react-intl'; + +import Heading3 from '~components/atoms/heading3'; +import isServerSide from '~lib/isServerSide'; + +import styles from './footer.module.scss'; export default function Footer({ scrollRef, diff --git a/src/components/organisms/header.spec.tsx b/src/components/organisms/header.spec.tsx index 19bb0b37d..6fc9e6cd2 100644 --- a/src/components/organisms/header.spec.tsx +++ b/src/components/organisms/header.spec.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import Header from '@components/organisms/header'; -import renderWithProviders from '@lib/test/renderWithProviders'; +import Header from '~components/organisms/header'; +import renderWithProviders from '~lib/test/renderWithProviders'; -jest.mock('@lib/api/fetchApi'); +jest.mock('~lib/api/fetchApi'); const renderHeader = async () => { return renderWithProviders(

, undefined); diff --git a/src/components/organisms/header.tsx b/src/components/organisms/header.tsx index ed99532e4..afc46bb81 100644 --- a/src/components/organisms/header.tsx +++ b/src/components/organisms/header.tsx @@ -2,7 +2,7 @@ import Image from 'next/legacy/image'; import Link from 'next/link'; import React from 'react'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import useLanguageRoute from '~lib/useLanguageRoute'; import styles from './header.module.scss'; diff --git a/src/components/organisms/libraryNav.tsx b/src/components/organisms/libraryNav.tsx index 0eda505c3..52e52a250 100644 --- a/src/components/organisms/libraryNav.tsx +++ b/src/components/organisms/libraryNav.tsx @@ -4,17 +4,16 @@ import { useRouter } from 'next/router'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading6 from '@components/atoms/heading6'; -import Button from '@components/molecules/button'; -import Dropdown from '@components/molecules/dropdown'; -import Mininav from '@components/molecules/mininav'; -import { SORT_MAP } from '@containers/library/library'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading6 from '~components/atoms/heading6'; +import Button from '~components/molecules/button'; +import Dropdown from '~components/molecules/dropdown'; +import Mininav from '~components/molecules/mininav'; +import { SORT_MAP } from '~containers/library/library'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import IconFilter from '../../../public/img/icons/icon-filter-light.svg'; import IconSort from '../../../public/img/icons/icon-sort-light.svg'; - import styles from './libraryNav.module.scss'; type Props = { diff --git a/src/components/organisms/miniplayer.tsx b/src/components/organisms/miniplayer.tsx index 846ae1cc2..cd061b1cf 100644 --- a/src/components/organisms/miniplayer.tsx +++ b/src/components/organisms/miniplayer.tsx @@ -1,24 +1,23 @@ +import 'video.js/dist/video-js.css'; + import Slider from '@material-ui/core/Slider'; import clsx from 'clsx'; import Link from 'next/link'; import React, { useContext } from 'react'; import { useIntl } from 'react-intl'; -import ButtonNudge from '@components/molecules/buttonNudge'; -import ButtonPlay from '@components/molecules/buttonPlay'; -import RecordingProgressBar from '@components/molecules/recordingProgressBar'; -import { PlaybackContext } from '@components/templates/andPlaybackContext'; -import { BaseColors } from '@lib/constants'; - -import { getSequenceTypeTheme } from '@lib/getSequenceType'; -import { useFormattedTime } from '@lib/time'; +import ButtonNudge from '~components/molecules/buttonNudge'; +import ButtonPlay from '~components/molecules/buttonPlay'; +import RecordingProgressBar from '~components/molecules/recordingProgressBar'; +import { PlaybackContext } from '~components/templates/andPlaybackContext'; +import { BaseColors } from '~lib/constants'; +import { getSequenceTypeTheme } from '~lib/getSequenceType'; +import { useFormattedTime } from '~lib/time'; +import { SequenceContentType } from '~src/__generated__/graphql'; import IconVolumeHigh from '../../../public/img/icons/icon-volume-high.svg'; import IconVolumeLow from '../../../public/img/icons/icon-volume-low.svg'; - -import 'video.js/dist/video-js.css'; import styles from './miniplayer.module.scss'; -import { SequenceContentType } from '@src/__generated__/graphql'; export default function Miniplayer(): JSX.Element | null { const intl = useIntl(); diff --git a/src/components/organisms/mobileHeader.tsx b/src/components/organisms/mobileHeader.tsx index 4654bc23b..380b288bc 100644 --- a/src/components/organisms/mobileHeader.tsx +++ b/src/components/organisms/mobileHeader.tsx @@ -1,21 +1,23 @@ +import clsx from 'clsx'; import { useRouter } from 'next/router'; import React, { useContext } from 'react'; import { FormattedMessage } from 'react-intl'; -import Button from '@components/molecules/button'; -import Mininav from '@components/molecules/mininav'; -import Header from '@components/organisms/header'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; -import { useNavigationItems } from '@lib/useNavigationItems'; + +import Button from '~components/molecules/button'; +import ButtonPlayback from '~components/molecules/buttonPlayback'; +import Mininav from '~components/molecules/mininav'; +import SearchBar from '~components/molecules/searchBar'; +import Header from '~components/organisms/header'; +import { PlaybackContext } from '~components/templates/andPlaybackContext'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; +import { useNavigationItems } from '~lib/useNavigationItems'; + +import IconExitSmall from '../../../public/img/icons/icon-exit-small.svg'; import MoreIcon from '../../../public/img/icons/icon-more.svg'; -import ButtonPlayback from '@components/molecules/buttonPlayback'; -import { PlaybackContext } from '@components/templates/andPlaybackContext'; import styles from './mobileHeader.module.scss'; import { useTransitionProgress } from './mobileHeader.useTransitionProgress'; -import SearchBar from '@components/molecules/searchBar'; -import clsx from 'clsx'; import { EntityFilterId } from './searchResults.filters'; -import IconExitSmall from '../../../public/img/icons/icon-exit-small.svg'; type Transition = [number, number]; diff --git a/src/components/organisms/mobileHeader.useTransitionProgress.ts b/src/components/organisms/mobileHeader.useTransitionProgress.ts index 4970ec5b9..1a25d0d4c 100644 --- a/src/components/organisms/mobileHeader.useTransitionProgress.ts +++ b/src/components/organisms/mobileHeader.useTransitionProgress.ts @@ -1,5 +1,6 @@ import React, { useCallback, useEffect, useState } from 'react'; -import isServerSide from '@lib/isServerSide'; + +import isServerSide from '~lib/isServerSide'; function useScrollTop(scrollRef: React.RefObject) { const [scrollTop, setScrollTop] = useState(0); diff --git a/src/components/organisms/modal.tsx b/src/components/organisms/modal.tsx index 22ca438d5..4e307dbe6 100644 --- a/src/components/organisms/modal.tsx +++ b/src/components/organisms/modal.tsx @@ -4,12 +4,11 @@ import MuiModal from '@material-ui/core/Modal'; import React, { ReactNode } from 'react'; import { useIntl } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import IconButton from '@components/molecules/iconButton'; -import { BaseColors } from '@lib/constants'; +import Heading2 from '~components/atoms/heading2'; +import IconButton from '~components/molecules/iconButton'; +import { BaseColors } from '~lib/constants'; import IconClose from '../../../public/img/icons/fa-times.svg'; - import styles from './modal.module.scss'; interface ModalProps { diff --git a/src/components/organisms/modalLoginForm.tsx b/src/components/organisms/modalLoginForm.tsx index 9ce4d4b62..56a8e51a6 100644 --- a/src/components/organisms/modalLoginForm.tsx +++ b/src/components/organisms/modalLoginForm.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import LoginForm from '@components/molecules/loginForm'; -import SocialLogin from '@components/molecules/socialLogin'; +import LoginForm from '~components/molecules/loginForm'; +import SocialLogin from '~components/molecules/socialLogin'; type Props = { onSuccess: () => Promise; diff --git a/src/components/organisms/modalRegisterForm.tsx b/src/components/organisms/modalRegisterForm.tsx index b9399de38..2c1373a8a 100644 --- a/src/components/organisms/modalRegisterForm.tsx +++ b/src/components/organisms/modalRegisterForm.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import SocialLogin from '@components/molecules/socialLogin'; +import SocialLogin from '~components/molecules/socialLogin'; import RegisterForm from './registerForm'; diff --git a/src/components/organisms/navigation.spec.tsx b/src/components/organisms/navigation.spec.tsx index 92687ee99..0b21f2230 100644 --- a/src/components/organisms/navigation.spec.tsx +++ b/src/components/organisms/navigation.spec.tsx @@ -2,10 +2,10 @@ import { screen } from '@testing-library/react'; import { __loadRouter } from 'next/router'; import React from 'react'; -import Navigation from '@components/organisms/navigation'; -import renderWithProviders from '@lib/test/renderWithProviders'; +import Navigation from '~components/organisms/navigation'; +import renderWithProviders from '~lib/test/renderWithProviders'; -jest.mock('@lib/api/fetchApi'); +jest.mock('~lib/api/fetchApi'); const renderNavigation = async () => { return renderWithProviders( diff --git a/src/components/organisms/navigation.tsx b/src/components/organisms/navigation.tsx index fbb9ea502..ecee33a8b 100644 --- a/src/components/organisms/navigation.tsx +++ b/src/components/organisms/navigation.tsx @@ -4,27 +4,24 @@ import { Router, useRouter } from 'next/router'; import React, { useEffect, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading3 from '@components/atoms/heading3'; -import Heading6 from '@components/atoms/heading6'; -import Button from '@components/molecules/button'; -import DownloadAppButton from '@components/molecules/downloadAppButton'; -import LanguageButton from '@components/molecules/languageButton'; -import NavItem from '@components/molecules/navItem'; -import SearchBar from '@components/molecules/searchBar'; -import Header from '@components/organisms/header'; -import { getSessionToken, setSessionToken } from '@lib/cookies'; - -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; -import { useNavigationItems } from '@lib/useNavigationItems'; -import { INavigationItem } from '@lib/useNavigationItems'; +import Heading3 from '~components/atoms/heading3'; +import Heading6 from '~components/atoms/heading6'; +import { useGetWithAuthGuardDataQuery } from '~components/HOCs/__generated__/withAuthGuard'; +import Button from '~components/molecules/button'; +import DownloadAppButton from '~components/molecules/downloadAppButton'; +import LanguageButton from '~components/molecules/languageButton'; +import NavItem from '~components/molecules/navItem'; +import SearchBar from '~components/molecules/searchBar'; +import Header from '~components/organisms/header'; +import { getSessionToken, setSessionToken } from '~lib/cookies'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; +import { INavigationItem, useNavigationItems } from '~lib/useNavigationItems'; import IconUser from '../../../public/img/icons/fa-user-heavy.svg'; import IconDisclosure from '../../../public/img/icons/icon-disclosure-light-small.svg'; import IconExit from '../../../public/img/icons/icon-exit.svg'; - import styles from './navigation.module.scss'; -import { useGetWithAuthGuardDataQuery } from '@components/HOCs/__generated__/withAuthGuard'; const Navigation = ({ onExit, diff --git a/src/components/organisms/notFound.tsx b/src/components/organisms/notFound.tsx index 3dfb1d431..6d9fe03c4 100644 --- a/src/components/organisms/notFound.tsx +++ b/src/components/organisms/notFound.tsx @@ -1,18 +1,17 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Alert from '@components/atoms/alert'; -import Heading1 from '@components/atoms/heading1'; -import Heading2 from '@components/atoms/heading2'; -import Button from '@components/molecules/button'; -import CardRecording from '@components/molecules/card/recording'; -import CardGroup from '@components/molecules/cardGroup'; +import Alert from '~components/atoms/alert'; +import Heading1 from '~components/atoms/heading1'; +import Heading2 from '~components/atoms/heading2'; +import Button from '~components/molecules/button'; +import CardRecording from '~components/molecules/card/recording'; +import CardGroup from '~components/molecules/cardGroup'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; - -import styles from './notFound.module.scss'; import { GetNotFoundPageDataQuery } from './__generated__/notFound'; +import styles from './notFound.module.scss'; export type NotFoundProps = Partial; diff --git a/src/components/organisms/paginatedCardList.tsx b/src/components/organisms/paginatedCardList.tsx index 86019b756..5ed15728c 100644 --- a/src/components/organisms/paginatedCardList.tsx +++ b/src/components/organisms/paginatedCardList.tsx @@ -1,10 +1,10 @@ import React, { PropsWithChildren } from 'react'; -import Heading1 from '@components/atoms/heading1'; -import ButtonBack from '@components/molecules/buttonBack'; -import CardGroup from '@components/molecules/cardGroup'; -import Pagination from '@components/molecules/pagination'; -import { PaginationData } from '@lib/getPaginatedStaticProps'; +import Heading1 from '~components/atoms/heading1'; +import ButtonBack from '~components/molecules/buttonBack'; +import CardGroup from '~components/molecules/cardGroup'; +import Pagination from '~components/molecules/pagination'; +import { PaginationData } from '~lib/getPaginatedStaticProps'; import styles from './paginatedCardList.module.scss'; diff --git a/src/components/organisms/recording.tsx b/src/components/organisms/recording.tsx index d1de3092d..2898aa4fb 100644 --- a/src/components/organisms/recording.tsx +++ b/src/components/organisms/recording.tsx @@ -5,41 +5,40 @@ import Link from 'next/link'; import React, { useEffect, useRef, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import Heading6 from '@components/atoms/heading6'; -import HorizontalRule from '@components/atoms/horizontalRule'; -import LineHeading from '@components/atoms/lineHeading'; -import BibleVersionTypeLockup from '@components/molecules/bibleVersionTypeLockup'; -import Button from '@components/molecules/button'; -import CopyrightInfo from '@components/molecules/copyrightInfo'; +import Heading1 from '~components/atoms/heading1'; +import Heading6 from '~components/atoms/heading6'; +import HorizontalRule from '~components/atoms/horizontalRule'; +import LineHeading from '~components/atoms/lineHeading'; +import { TeaseRecordingFragment } from '~components/molecules/__generated__/teaseRecording'; +import BibleVersionTypeLockup from '~components/molecules/bibleVersionTypeLockup'; +import Button from '~components/molecules/button'; +import CopyrightInfo from '~components/molecules/copyrightInfo'; import DefinitionList, { IDefinitionListTerm, -} from '@components/molecules/definitionList'; -import MediaFormatSwitcher from '@components/molecules/mediaFormatSwitcher'; -import PersonLockup from '@components/molecules/personLockup'; -import Player from '@components/molecules/player'; -import SequenceNav from '@components/molecules/sequenceNav'; -import SequenceTypeLockup from '@components/molecules/sequenceTypeLockup'; -import Tease from '@components/molecules/tease'; -import TeaseRecording from '@components/molecules/teaseRecording'; -import Transcript from '@components/molecules/transcript'; -import { formatLongDateTime, parseRelativeDate } from '@lib/date'; -import { getRecordingTypeTheme } from '@lib/getRecordingTheme'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +} from '~components/molecules/definitionList'; +import MediaFormatSwitcher from '~components/molecules/mediaFormatSwitcher'; +import PersonLockup from '~components/molecules/personLockup'; +import Player from '~components/molecules/player'; +import SequenceNav from '~components/molecules/sequenceNav'; +import SequenceTypeLockup from '~components/molecules/sequenceTypeLockup'; +import Tease from '~components/molecules/tease'; +import TeaseRecording from '~components/molecules/teaseRecording'; +import Transcript from '~components/molecules/transcript'; +import { formatLongDateTime, parseRelativeDate } from '~lib/date'; +import { getRecordingTypeTheme } from '~lib/getRecordingTheme'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; +import { + RecordingContentType, + SequenceContentType, +} from '~src/__generated__/graphql'; import IconBack from '../../../public/img/icons/icon-back-light.svg'; import IconBlogLight from '../../../public/img/icons/icon-blog-light-small.svg'; import IconDisclosure from '../../../public/img/icons/icon-disclosure-light-small.svg'; import IconDownload from '../../../public/img/icons/icon-download.svg'; - -import styles from './recording.module.scss'; -import { TeaseRecordingFragment } from '@components/molecules/__generated__/teaseRecording'; -import { - RecordingContentType, - SequenceContentType, -} from '@src/__generated__/graphql'; import { RecordingFragment } from './__generated__/recording'; +import styles from './recording.module.scss'; interface RecordingProps { recording: RecordingFragment; diff --git a/src/components/organisms/registerForm.tsx b/src/components/organisms/registerForm.tsx index 5857d0f25..3972e3dcc 100644 --- a/src/components/organisms/registerForm.tsx +++ b/src/components/organisms/registerForm.tsx @@ -1,13 +1,13 @@ import React, { useEffect, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Button from '@components/molecules/button'; -import ButtonGuest from '@components/molecules/buttonGuest'; -import Input from '@components/molecules/form/input'; -import { setSessionToken } from '@lib/cookies'; +import Button from '~components/molecules/button'; +import ButtonGuest from '~components/molecules/buttonGuest'; +import Input from '~components/molecules/form/input'; +import { useRegisterMutation } from '~containers/account/__generated__/register'; +import { setSessionToken } from '~lib/cookies'; import styles from './registerForm.module.scss'; -import { useRegisterMutation } from '@containers/account/__generated__/register'; type Props = { showLogin: () => void; diff --git a/src/components/organisms/searchResults.filters.tsx b/src/components/organisms/searchResults.filters.tsx index 5072f7003..63a6f93c1 100644 --- a/src/components/organisms/searchResults.filters.tsx +++ b/src/components/organisms/searchResults.filters.tsx @@ -1,6 +1,7 @@ +import { useRouter } from 'next/router'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import { useRouter } from 'next/router'; + import { GetSearchAudiobooksDocument, GetSearchConferencesDocument, diff --git a/src/components/organisms/searchResults.tsx b/src/components/organisms/searchResults.tsx index f4e5f2d33..f3079179a 100644 --- a/src/components/organisms/searchResults.tsx +++ b/src/components/organisms/searchResults.tsx @@ -1,20 +1,22 @@ +import Head from 'next/head'; import React, { RefObject, useEffect, useMemo, useRef, useState } from 'react'; import { useIntl } from 'react-intl'; -import LineHeading from '@components/atoms/lineHeading'; -import Button from '@components/molecules/button'; + +import LineHeading from '~components/atoms/lineHeading'; +import Button from '~components/molecules/button'; +import { CardRecordingFragment } from '~components/molecules/card/__generated__/recording'; import CardInferred, { InferrableEntity, -} from '@components/molecules/card/inferred'; -import CardGroup from '@components/molecules/cardGroup'; -import LoadingCards from '@components/molecules/loadingCards'; +} from '~components/molecules/card/inferred'; +import CardGroup from '~components/molecules/cardGroup'; +import LoadingCards from '~components/molecules/loadingCards'; +import isServerSide from '~lib/isServerSide'; +import { useQueryString } from '~lib/useQueryString'; + import ForwardIcon from '../../../public/img/icons/icon-forward-light.svg'; +import { EntityFilterId } from './searchResults.filters'; import styles from './searchResults.module.scss'; -import Head from 'next/head'; -import { useQueryString } from '@lib/useQueryString'; import useSearch, { AugmentedFilter } from './searchResults.useResults'; -import { EntityFilterId } from './searchResults.filters'; -import isServerSide from '@lib/isServerSide'; -import { CardRecordingFragment } from '@components/molecules/card/__generated__/recording'; function SearchHead({ term }: { term?: string }): JSX.Element { // WORKAROUND: We can't use the component here because diff --git a/src/components/organisms/searchResults.useResults.tsx b/src/components/organisms/searchResults.useResults.tsx index 318ba72e7..9e24167d6 100644 --- a/src/components/organisms/searchResults.useResults.tsx +++ b/src/components/organisms/searchResults.useResults.tsx @@ -1,7 +1,9 @@ -import { InferrableEntity } from '@components/molecules/card/inferred'; -import { useLanguageId } from '@lib/useLanguageId'; import { InfiniteQueryObserverResult, useInfiniteQuery } from 'react-query'; -import { fetchApi } from '@lib/api/fetchApi'; + +import { InferrableEntity } from '~components/molecules/card/inferred'; +import { fetchApi } from '~lib/api/fetchApi'; +import { useLanguageId } from '~lib/useLanguageId'; + import { EntityFilter, EntityFilterId, filters } from './searchResults.filters'; const PAGE_SIZE = 10; diff --git a/src/components/organisms/section.tsx b/src/components/organisms/section.tsx index 64be649e3..0d6b5127f 100644 --- a/src/components/organisms/section.tsx +++ b/src/components/organisms/section.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx'; import React from 'react'; -import { BaseColors } from '@lib/constants'; +import { BaseColors } from '~lib/constants'; import styles from './section.module.scss'; diff --git a/src/components/organisms/sequence.tsx b/src/components/organisms/sequence.tsx index 0f244faab..f0d2d5e98 100644 --- a/src/components/organisms/sequence.tsx +++ b/src/components/organisms/sequence.tsx @@ -3,33 +3,32 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import HorizontalRule from '@components/atoms/horizontalRule'; -import RoundImage from '@components/atoms/roundImage'; -import ButtonFavorite from '@components/molecules/buttonFavorite'; -import { isBackgroundColorDark } from '@components/molecules/buttonPlay'; -import ButtonShare from '@components/molecules/buttonShare'; -import CardRecording from '@components/molecules/card/recording'; -import CardGroup from '@components/molecules/cardGroup'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import HorizontalRule from '~components/atoms/horizontalRule'; +import RoundImage from '~components/atoms/roundImage'; +import ButtonFavorite from '~components/molecules/buttonFavorite'; +import { isBackgroundColorDark } from '~components/molecules/buttonPlay'; +import ButtonShare from '~components/molecules/buttonShare'; +import CardRecording from '~components/molecules/card/recording'; +import CardGroup from '~components/molecules/cardGroup'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; import DefinitionList, { IDefinitionListTerm, -} from '@components/molecules/definitionList'; -import SequenceTypeLockup from '@components/molecules/sequenceTypeLockup'; -import Tease from '@components/molecules/tease'; -import { useIsSequenceFavorited } from '@lib/api/useIsSequenceFavorited'; -import { formatDateRange } from '@lib/date'; +} from '~components/molecules/definitionList'; +import SequenceTypeLockup from '~components/molecules/sequenceTypeLockup'; +import Tease from '~components/molecules/tease'; +import { useIsSequenceFavorited } from '~lib/api/useIsSequenceFavorited'; +import { formatDateRange } from '~lib/date'; +import { getSequenceTypeTheme } from '~lib/getSequenceType'; +import root from '~lib/routes'; +import { useFormattedDuration } from '~lib/time'; +import { UnreachableCaseError } from '~lib/typeHelpers'; +import useLanguageRoute from '~lib/useLanguageRoute'; +import { SequenceContentType } from '~src/__generated__/graphql'; -import { getSequenceTypeTheme } from '@lib/getSequenceType'; -import root from '@lib/routes'; -import { useFormattedDuration } from '@lib/time'; -import { UnreachableCaseError } from '@lib/typeHelpers'; -import useLanguageRoute from '@lib/useLanguageRoute'; - -import styles from './sequence.module.scss'; -import { SequenceContentType } from '@src/__generated__/graphql'; import { SequenceFragment } from './__generated__/sequence'; +import styles from './sequence.module.scss'; export function Sequence({ sequence, diff --git a/src/components/organisms/slider.spec.tsx b/src/components/organisms/slider.spec.tsx index 9c73e9f6a..fa062aa32 100644 --- a/src/components/organisms/slider.spec.tsx +++ b/src/components/organisms/slider.spec.tsx @@ -1,9 +1,9 @@ import userEvent from '@testing-library/user-event'; import React from 'react'; -import CardSermon from '@components/molecules/card/sermon'; -import Slider from '@components/organisms/slider'; -import { buildRenderer } from '@lib/test/buildRenderer'; +import CardSermon from '~components/molecules/card/sermon'; +import Slider from '~components/organisms/slider'; +import { buildRenderer } from '~lib/test/buildRenderer'; const renderComponent = buildRenderer(Slider); diff --git a/src/components/organisms/slider.tsx b/src/components/organisms/slider.tsx index 1678f8bb6..ccac2b523 100644 --- a/src/components/organisms/slider.tsx +++ b/src/components/organisms/slider.tsx @@ -2,11 +2,10 @@ import clsx from 'clsx'; import React, { ReactNode, useState } from 'react'; import { useIntl } from 'react-intl'; -import Button from '@components/molecules/button'; +import Button from '~components/molecules/button'; import ArrowLeft from '../../../public/img/icons/icon-back-light.svg'; import ArrowRight from '../../../public/img/icons/icon-forward-light.svg'; - import styles from './slider.module.scss'; interface SliderProps { diff --git a/src/components/organisms/testimonies.spec.tsx b/src/components/organisms/testimonies.spec.tsx index 07e1b67b8..d75440069 100644 --- a/src/components/organisms/testimonies.spec.tsx +++ b/src/components/organisms/testimonies.spec.tsx @@ -1,5 +1,5 @@ -import Testimonies from '@components/organisms/testimonies'; -import { buildRenderer } from '@lib/test/buildRenderer'; +import Testimonies from '~components/organisms/testimonies'; +import { buildRenderer } from '~lib/test/buildRenderer'; const renderComponent = buildRenderer(Testimonies, { defaultProps: { diff --git a/src/components/organisms/testimonies.tsx b/src/components/organisms/testimonies.tsx index 7e0fd9521..bcd55821c 100644 --- a/src/components/organisms/testimonies.tsx +++ b/src/components/organisms/testimonies.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import Slider from '@components/organisms/slider'; +import Slider from '~components/organisms/slider'; -import styles from './testimonies.module.scss'; import { TestimoniesFragment } from './__generated__/testimonies'; +import styles from './testimonies.module.scss'; interface TestimoniesProps { testimonies: TestimoniesFragment[]; diff --git a/src/components/templates/__generated__/andMiniplayer.ts b/src/components/templates/__generated__/andMiniplayer.ts index b2e097e9e..1bf01162c 100644 --- a/src/components/templates/__generated__/andMiniplayer.ts +++ b/src/components/templates/__generated__/andMiniplayer.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, useMutation, UseQueryOptions, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type AndMiniplayerFragment = { __typename?: 'Recording', id: string | number, title: string, canonicalPath: string, duration: number, sequence: { __typename?: 'Sequence', title: string, contentType: Types.SequenceContentType } | null, collection: { __typename?: 'Collection', title: string } | null, audioFiles: Array<{ __typename?: 'AudioFile', url: string, filesize: string, mimeType: string, duration: number }>, videoFiles: Array<{ __typename?: 'VideoFile', url: string, filesize: string, mimeType: string, duration: number }>, videoStreams: Array<{ __typename?: 'VideoFile', url: string, logUrl: string | null, filesize: string, mimeType: string, duration: number }> }; export type GetRecordingPlaybackProgressQueryVariables = Types.Exact<{ @@ -97,7 +97,7 @@ export const useRecordingPlaybackProgressSetMutation = < (variables?: RecordingPlaybackProgressSetMutationVariables) => graphqlFetcher(RecordingPlaybackProgressSetDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getRecordingPlaybackProgress( variables: ExactAlt diff --git a/src/components/templates/andGlobalModals.tsx b/src/components/templates/andGlobalModals.tsx index 1e1816239..f828a165c 100644 --- a/src/components/templates/andGlobalModals.tsx +++ b/src/components/templates/andGlobalModals.tsx @@ -3,9 +3,9 @@ import React, { ReactNode, useState } from 'react'; import { FormattedMessage } from 'react-intl'; import { useQueryClient } from 'react-query'; -import Button from '@components/molecules/button'; -import { refetchUserQueries } from '@lib/api/login'; -import { UnreachableCaseError } from '@lib/typeHelpers'; +import Button from '~components/molecules/button'; +import { refetchUserQueries } from '~lib/api/login'; +import { UnreachableCaseError } from '~lib/typeHelpers'; import styles from './andGlobalModals.module.scss'; diff --git a/src/components/templates/andMiniplayer.spec.tsx b/src/components/templates/andMiniplayer.spec.tsx index 69245e78a..ebe024ad4 100644 --- a/src/components/templates/andMiniplayer.spec.tsx +++ b/src/components/templates/andMiniplayer.spec.tsx @@ -1,14 +1,13 @@ import React, { useContext, useEffect, useState } from 'react'; -import AndMiniplayer from '@components/templates/andMiniplayer'; +import AndMiniplayer from '~components/templates/andMiniplayer'; import AndPlaybackContext, { PlaybackContext, PlaybackContextType, -} from '@components/templates/andPlaybackContext'; - -import { buildRenderer } from '@lib/test/buildRenderer'; -import setPlayerMock from '@lib/test/setPlayerMock'; -import { SequenceContentType } from '@src/__generated__/graphql'; +} from '~components/templates/andPlaybackContext'; +import { buildRenderer } from '~lib/test/buildRenderer'; +import setPlayerMock from '~lib/test/setPlayerMock'; +import { SequenceContentType } from '~src/__generated__/graphql'; const renderComponent = buildRenderer(AndPlaybackContext); diff --git a/src/components/templates/andNavigation.spec.tsx b/src/components/templates/andNavigation.spec.tsx index 2925af1e2..db925d814 100644 --- a/src/components/templates/andNavigation.spec.tsx +++ b/src/components/templates/andNavigation.spec.tsx @@ -1,14 +1,16 @@ -import userEvent from '@testing-library/user-event'; -import { buildRenderer } from '../../lib/test/buildRenderer'; -import AndNavigation from './andNavigation'; import { screen } from '@testing-library/react'; -import { buildLoader } from '../../lib/test/buildLoader'; -import { CardPersonFragment } from '@components/molecules/card/__generated__/person'; -import { CardRecordingFragment } from '@components/molecules/card/__generated__/recording'; +import userEvent from '@testing-library/user-event'; + +import { CardPersonFragment } from '~components/molecules/card/__generated__/person'; +import { CardRecordingFragment } from '~components/molecules/card/__generated__/recording'; import { GetSearchPersonsDocument, GetSearchRecordingsDocument, -} from '@components/organisms/__generated__/searchResults'; +} from '~components/organisms/__generated__/searchResults'; + +import { buildLoader } from '../../lib/test/buildLoader'; +import { buildRenderer } from '../../lib/test/buildRenderer'; +import AndNavigation from './andNavigation'; const renderTemplate = buildRenderer(AndNavigation); diff --git a/src/components/templates/andNavigation.tsx b/src/components/templates/andNavigation.tsx index 908199d72..f031ae770 100644 --- a/src/components/templates/andNavigation.tsx +++ b/src/components/templates/andNavigation.tsx @@ -1,17 +1,19 @@ +import clsx from 'clsx'; import { useRouter } from 'next/router'; import React, { ReactNode, useEffect, useRef, useState } from 'react'; -import LanguageAlternativesAlert from '@components/molecules/languageAlternativesAlert'; -import SearchBar from '@components/molecules/searchBar'; -import styles from './andNavigation.module.scss'; -import MobileHeader from '@components/organisms/mobileHeader'; -import Drawer from '@components/organisms/drawer'; -import SearchResults from '@containers/search'; -import Footer from '@components/organisms/footer'; + +import LanguageAlternativesAlert from '~components/molecules/languageAlternativesAlert'; +import SearchBar from '~components/molecules/searchBar'; +import Drawer from '~components/organisms/drawer'; +import Footer from '~components/organisms/footer'; +import MobileHeader from '~components/organisms/mobileHeader'; import { EntityFilterId, useContextualFilterId, -} from '@components/organisms/searchResults.filters'; -import clsx from 'clsx'; +} from '~components/organisms/searchResults.filters'; +import SearchResults from '~containers/search'; + +import styles from './andNavigation.module.scss'; export default function AndNavigation({ children, diff --git a/src/components/templates/andOnboarding.tsx b/src/components/templates/andOnboarding.tsx index 336781840..90c4e264c 100644 --- a/src/components/templates/andOnboarding.tsx +++ b/src/components/templates/andOnboarding.tsx @@ -1,13 +1,12 @@ import React, { ReactNode } from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import Slider from '@components/organisms/slider'; -import { getAppFeatures } from '@lib/getAppFeatures'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading1 from '~components/atoms/heading1'; +import Slider from '~components/organisms/slider'; +import { getAppFeatures } from '~lib/getAppFeatures'; +import useLanguageRoute from '~lib/useLanguageRoute'; import LogoLarge from '../../../public/img/logo-large.svg'; - import styles from './andOnboarding.module.scss'; export default function AndOnboarding({ diff --git a/src/components/templates/andPlaybackContext.tsx b/src/components/templates/andPlaybackContext.tsx index 617f78743..23feaee69 100644 --- a/src/components/templates/andPlaybackContext.tsx +++ b/src/components/templates/andPlaybackContext.tsx @@ -10,13 +10,12 @@ import React, { useState, } from 'react'; import { useMutation, useQueryClient } from 'react-query'; -import type { VideoJsPlayer } from 'video.js'; import type * as VideoJs from 'video.js'; -import { getSessionToken } from '@lib/cookies'; +import { getSessionToken } from '~lib/cookies'; +import hasVideo from '~lib/hasVideo'; +import { Scalars } from '~src/__generated__/graphql'; -import hasVideo from '@lib/hasVideo'; -import { Scalars } from '@src/__generated__/graphql'; import { AndMiniplayerFragment, GetRecordingPlaybackProgressQuery, @@ -76,7 +75,7 @@ export const shouldLoadRecordingPlaybackProgress = ( !!getSessionToken(); export type PlaybackContextType = { - player: () => VideoJsPlayer | undefined; // TODO: remove this in favor of single-purpose methods + player: () => VideoJs.VideoJsPlayer | undefined; // TODO: remove this in favor of single-purpose methods play: () => void; chromecastTrigger: () => void; airPlayTrigger: () => void; @@ -191,7 +190,7 @@ export default function AndPlaybackContext({ const [progress, _setProgress] = useState(0); const [bufferedProgress, setBufferedProgress] = useState(0); const onLoadRef = useRef<(c: PlaybackContextType) => void>(); - const playerRef = useRef(); + const playerRef = useRef(); const progressRef = useRef(0); const [isPaused, setIsPaused] = useState(true); const [prefersAudio, setPrefersAudio] = useState(false); diff --git a/src/containers/__generated__/blog.ts b/src/containers/__generated__/blog.ts index 21db17689..547fff679 100644 --- a/src/containers/__generated__/blog.ts +++ b/src/containers/__generated__/blog.ts @@ -2,7 +2,7 @@ import * as Types from '../../__generated__/graphql'; import { CardPostFragmentDoc } from '../../components/molecules/card/__generated__/post'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetBlogPageDataQueryVariables = Types.Exact<{ language: Types.Language; offset?: Types.InputMaybe; @@ -70,7 +70,7 @@ export const useGetBlogPathsDataQuery = < graphqlFetcher(GetBlogPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getBlogPageData( variables: ExactAlt diff --git a/src/containers/__generated__/contact.ts b/src/containers/__generated__/contact.ts index 71a601a8d..bf23faa98 100644 --- a/src/containers/__generated__/contact.ts +++ b/src/containers/__generated__/contact.ts @@ -1,7 +1,7 @@ import * as Types from '../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type SubmitContactPageMutationVariables = Types.Exact<{ language: Types.Language; recipient: Types.PageContactRecipient; @@ -33,7 +33,7 @@ export const useSubmitContactPageMutation = < (variables?: SubmitContactPageMutationVariables) => graphqlFetcher(SubmitContactPageDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function submitContactPage( variables: ExactAlt diff --git a/src/containers/__generated__/discover.ts b/src/containers/__generated__/discover.ts index ad747a7dd..f8601e913 100644 --- a/src/containers/__generated__/discover.ts +++ b/src/containers/__generated__/discover.ts @@ -10,7 +10,7 @@ import { CardSequenceFragmentDoc } from '../../components/molecules/card/__gener import { CardCollectionFragmentDoc } from '../../components/molecules/card/__generated__/collection'; import { CardPostFragmentDoc } from '../../components/molecules/card/__generated__/post'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetDiscoverPageDataQueryVariables = Types.Exact<{ language: Types.Language; }>; @@ -118,7 +118,7 @@ export const useGetDiscoverPageDataQuery = < graphqlFetcher(GetDiscoverPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getDiscoverPageData( variables: ExactAlt diff --git a/src/containers/__generated__/home.ts b/src/containers/__generated__/home.ts index 3027c3fd0..0d8f61d9c 100644 --- a/src/containers/__generated__/home.ts +++ b/src/containers/__generated__/home.ts @@ -10,7 +10,7 @@ import { TestimoniesFragmentDoc } from '../../components/organisms/__generated__ import { CardPostFragmentDoc } from '../../components/molecules/card/__generated__/post'; import { CardSequenceFragmentDoc } from '../../components/molecules/card/__generated__/sequence'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetHomeStaticPropsQueryVariables = Types.Exact<{ language: Types.Language; }>; @@ -71,7 +71,7 @@ export const useGetHomeStaticPropsQuery = < graphqlFetcher(GetHomeStaticPropsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getHomeStaticProps( variables: ExactAlt diff --git a/src/containers/__generated__/testimonies.ts b/src/containers/__generated__/testimonies.ts index 32cddf9c1..037bd5194 100644 --- a/src/containers/__generated__/testimonies.ts +++ b/src/containers/__generated__/testimonies.ts @@ -1,7 +1,7 @@ import * as Types from '../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetTestimoniesPageDataQueryVariables = Types.Exact<{ language: Types.Language; offset: Types.InputMaybe; @@ -71,7 +71,7 @@ export const useGetTestimoniesPathsDataQuery = < graphqlFetcher(GetTestimoniesPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getTestimoniesPageData( variables: ExactAlt diff --git a/src/containers/about/__generated__/index.ts b/src/containers/about/__generated__/index.ts index 0b3cab94d..e7d862dcc 100644 --- a/src/containers/about/__generated__/index.ts +++ b/src/containers/about/__generated__/index.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetAboutPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -62,7 +62,7 @@ export const useGetAboutStaticPathsQuery = < graphqlFetcher(GetAboutStaticPathsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getAboutPageData( variables: ExactAlt diff --git a/src/containers/about/index.tsx b/src/containers/about/index.tsx index 0c7291eca..c5d83eb35 100644 --- a/src/containers/about/index.tsx +++ b/src/containers/about/index.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import Heading1 from '@components/atoms/heading1'; -import withFailStates from '@components/HOCs/withFailStates'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import AboutNav from '@components/organisms/aboutNav'; +import Heading1 from '~components/atoms/heading1'; +import withFailStates from '~components/HOCs/withFailStates'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import AboutNav from '~components/organisms/aboutNav'; -import styles from './index.module.scss'; import { GetAboutPageDataQuery } from './__generated__'; +import styles from './index.module.scss'; export type AboutProps = GetAboutPageDataQuery; diff --git a/src/containers/about/purpose.tsx b/src/containers/about/purpose.tsx index f0e966375..904b7a57f 100644 --- a/src/containers/about/purpose.tsx +++ b/src/containers/about/purpose.tsx @@ -3,19 +3,18 @@ import Image from 'next/legacy/image'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import Heading2 from '@components/atoms/heading2'; -import HorizontalRule from '@components/atoms/horizontalRule'; -import Button from '@components/molecules/button'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import AboutNav from '@components/organisms/aboutNav'; -import { BaseColors } from '@lib/constants'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading1 from '~components/atoms/heading1'; +import Heading2 from '~components/atoms/heading2'; +import HorizontalRule from '~components/atoms/horizontalRule'; +import Button from '~components/molecules/button'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import AboutNav from '~components/organisms/aboutNav'; +import { BaseColors } from '~lib/constants'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import IconBack from '../../../public/img/icons/icon-back-light.svg'; import IconForward from '../../../public/img/icons/icon-forward-light.svg'; - import styles from './purpose.module.scss'; import sharedStyles from './shared.module.scss'; diff --git a/src/containers/about/spirit.tsx b/src/containers/about/spirit.tsx index e2c7bf8c4..c2fb8cc7a 100644 --- a/src/containers/about/spirit.tsx +++ b/src/containers/about/spirit.tsx @@ -1,16 +1,15 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import Button from '@components/molecules/button'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import AboutNav from '@components/organisms/aboutNav'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading1 from '~components/atoms/heading1'; +import Button from '~components/molecules/button'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import AboutNav from '~components/organisms/aboutNav'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import IconBack from '../../../public/img/icons/icon-back-light.svg'; import IconForward from '../../../public/img/icons/icon-forward-light.svg'; - import sharedStyles from './shared.module.scss'; import styles from './spirit.module.scss'; diff --git a/src/containers/about/story.tsx b/src/containers/about/story.tsx index f79ddb4e0..57bd5f2eb 100644 --- a/src/containers/about/story.tsx +++ b/src/containers/about/story.tsx @@ -2,15 +2,14 @@ import Image from 'next/legacy/image'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import Button from '@components/molecules/button'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import AboutNav from '@components/organisms/aboutNav'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading1 from '~components/atoms/heading1'; +import Button from '~components/molecules/button'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import AboutNav from '~components/organisms/aboutNav'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import IconForward from '../../../public/img/icons/icon-forward-light.svg'; - import sharedStyles from './shared.module.scss'; export default function Story(): JSX.Element { diff --git a/src/containers/about/team.tsx b/src/containers/about/team.tsx index 864179440..14eae3d6c 100644 --- a/src/containers/about/team.tsx +++ b/src/containers/about/team.tsx @@ -2,21 +2,20 @@ import Image from 'next/legacy/image'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import Heading2 from '@components/atoms/heading2'; -import RoundImage from '@components/atoms/roundImage'; -import Button from '@components/molecules/button'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import TypeLockup from '@components/molecules/typeLockup'; -import AboutNav from '@components/organisms/aboutNav'; -import { BaseColors } from '@lib/constants'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading1 from '~components/atoms/heading1'; +import Heading2 from '~components/atoms/heading2'; +import RoundImage from '~components/atoms/roundImage'; +import Button from '~components/molecules/button'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import TypeLockup from '~components/molecules/typeLockup'; +import AboutNav from '~components/organisms/aboutNav'; +import { BaseColors } from '~lib/constants'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import IconUser from '../../../public/img/icons/fa-user-light.svg'; import IconBack from '../../../public/img/icons/icon-back-light.svg'; import IconForward from '../../../public/img/icons/icon-forward-light.svg'; - import sharedStyles from './shared.module.scss'; import styles from './team.module.scss'; diff --git a/src/containers/account/__generated__/playlists.ts b/src/containers/account/__generated__/playlists.ts index 1c8cf730b..7715cc327 100644 --- a/src/containers/account/__generated__/playlists.ts +++ b/src/containers/account/__generated__/playlists.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, useMutation, UseQueryOptions, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetAccountPlaylistsPageDataQueryVariables = Types.Exact<{ language: Types.Language; }>; @@ -72,7 +72,7 @@ export const useAddAccountPlaylistMutation = < (variables?: AddAccountPlaylistMutationVariables) => graphqlFetcher(AddAccountPlaylistDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getAccountPlaylistsPageData( variables: ExactAlt diff --git a/src/containers/account/__generated__/preferences.ts b/src/containers/account/__generated__/preferences.ts index da1fc559c..65cd7ff05 100644 --- a/src/containers/account/__generated__/preferences.ts +++ b/src/containers/account/__generated__/preferences.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, useMutation, UseQueryOptions, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetAccountPreferencesDataQueryVariables = Types.Exact<{ [key: string]: never; }>; @@ -73,7 +73,7 @@ export const useUpdateAccountPreferencesMutation = < (variables?: UpdateAccountPreferencesMutationVariables) => graphqlFetcher(UpdateAccountPreferencesDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getAccountPreferencesData( variables: ExactAlt diff --git a/src/containers/account/__generated__/profile.ts b/src/containers/account/__generated__/profile.ts index adbb77a59..51edbe9c5 100644 --- a/src/containers/account/__generated__/profile.ts +++ b/src/containers/account/__generated__/profile.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, useMutation, UseQueryOptions, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetProfileDataQueryVariables = Types.Exact<{ [key: string]: never; }>; @@ -105,7 +105,7 @@ export const useDeleteAccountMutation = < (variables?: DeleteAccountMutationVariables) => graphqlFetcher(DeleteAccountDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getProfileData( variables: ExactAlt diff --git a/src/containers/account/__generated__/register.ts b/src/containers/account/__generated__/register.ts index 88705135a..0e6949dcd 100644 --- a/src/containers/account/__generated__/register.ts +++ b/src/containers/account/__generated__/register.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type RegisterMutationVariables = Types.Exact<{ email: Types.Scalars['String']; password: Types.Scalars['String']; @@ -70,7 +70,7 @@ export const useRegisterSocialMutation = < (variables?: RegisterSocialMutationVariables) => graphqlFetcher(RegisterSocialDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function register( variables: ExactAlt diff --git a/src/containers/account/__generated__/reset.ts b/src/containers/account/__generated__/reset.ts index ef477c963..db72a3da8 100644 --- a/src/containers/account/__generated__/reset.ts +++ b/src/containers/account/__generated__/reset.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type ResetPasswordMutationVariables = Types.Exact<{ token: Types.Scalars['String']; password: Types.Scalars['String']; @@ -30,7 +30,7 @@ export const useResetPasswordMutation = < (variables?: ResetPasswordMutationVariables) => graphqlFetcher(ResetPasswordDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function resetPassword( variables: ExactAlt diff --git a/src/containers/account/login.spec.tsx b/src/containers/account/login.spec.tsx index 60b39aacd..eba0a0acc 100644 --- a/src/containers/account/login.spec.tsx +++ b/src/containers/account/login.spec.tsx @@ -1,9 +1,9 @@ import { waitFor } from '@testing-library/react'; import { __mockedRouter } from 'next/router'; -import { buildRenderer } from '@lib/test/buildRenderer'; -import { loadAuthGuardData } from '@lib/test/loadAuthGuardData'; -import Login from '@pages/[language]/account/login'; +import { buildRenderer } from '~lib/test/buildRenderer'; +import { loadAuthGuardData } from '~lib/test/loadAuthGuardData'; +import Login from '~pages/[language]/account/login'; const renderPage = buildRenderer(Login); diff --git a/src/containers/account/login.tsx b/src/containers/account/login.tsx index 51927a86c..0bd390cb2 100644 --- a/src/containers/account/login.tsx +++ b/src/containers/account/login.tsx @@ -1,4 +1,4 @@ -import withAuthGuard from '@components/HOCs/withAuthGuard'; +import withAuthGuard from '~components/HOCs/withAuthGuard'; import LoginRedirect from './loginRedirect'; diff --git a/src/containers/account/loginRedirect.tsx b/src/containers/account/loginRedirect.tsx index a9064411d..19ee927a9 100644 --- a/src/containers/account/loginRedirect.tsx +++ b/src/containers/account/loginRedirect.tsx @@ -2,8 +2,8 @@ import { useRouter } from 'next/router'; import React, { useEffect } from 'react'; import { FormattedMessage } from 'react-intl'; -import root, { isRedirectRouteAllowed } from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import root, { isRedirectRouteAllowed } from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; export default function LoginRedirect(): JSX.Element { const router = useRouter(); diff --git a/src/containers/account/logout.spec.tsx b/src/containers/account/logout.spec.tsx index 804cee493..e50504c83 100644 --- a/src/containers/account/logout.spec.tsx +++ b/src/containers/account/logout.spec.tsx @@ -1,10 +1,10 @@ import { act } from '@testing-library/react'; -import { useLogout } from '@lib/api/useLogout'; -import { buildRenderer } from '@lib/test/buildRenderer'; -import Logout from '@pages/[language]/account/logout'; +import { useLogout } from '~lib/api/useLogout'; +import { buildRenderer } from '~lib/test/buildRenderer'; +import Logout from '~pages/[language]/account/logout'; -jest.mock('@lib/api/useLogout'); +jest.mock('~lib/api/useLogout'); const renderPage = buildRenderer(Logout); const mockUseLogout = useLogout as jest.Mock; diff --git a/src/containers/account/playlists.spec.tsx b/src/containers/account/playlists.spec.tsx index 06ac915c8..a9ce00545 100644 --- a/src/containers/account/playlists.spec.tsx +++ b/src/containers/account/playlists.spec.tsx @@ -4,16 +4,16 @@ import Cookies from 'js-cookie'; import cloneDeep from 'lodash/cloneDeep'; import set from 'lodash/set'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildLoader } from '@lib/test/buildLoader'; -import { buildRenderer } from '@lib/test/buildRenderer'; -import { loadAuthGuardData } from '@lib/test/loadAuthGuardData'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildLoader } from '~lib/test/buildLoader'; +import { buildRenderer } from '~lib/test/buildRenderer'; +import { loadAuthGuardData } from '~lib/test/loadAuthGuardData'; -import Playlists from './playlists'; import { AddAccountPlaylistDocument, GetAccountPlaylistsPageDataDocument, } from './__generated__/playlists'; +import Playlists from './playlists'; const renderPage = buildRenderer(Playlists); diff --git a/src/containers/account/playlists.tsx b/src/containers/account/playlists.tsx index 64a4dc7a0..aaf4063c1 100644 --- a/src/containers/account/playlists.tsx +++ b/src/containers/account/playlists.tsx @@ -2,10 +2,11 @@ import React, { FormEvent, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; import { useQueryClient } from 'react-query'; -import withAuthGuard from '@components/HOCs/withAuthGuard'; -import Checkbox from '@components/molecules/form/checkbox'; -import Input from '@components/molecules/form/input'; -import { useLanguageId } from '@lib/useLanguageId'; +import withAuthGuard from '~components/HOCs/withAuthGuard'; +import Checkbox from '~components/molecules/form/checkbox'; +import Input from '~components/molecules/form/input'; +import { useLanguageId } from '~lib/useLanguageId'; + import { useAddAccountPlaylistMutation, useGetAccountPlaylistsPageDataQuery, diff --git a/src/containers/account/preferences.tsx b/src/containers/account/preferences.tsx index b5608c267..2e0162f35 100644 --- a/src/containers/account/preferences.tsx +++ b/src/containers/account/preferences.tsx @@ -3,25 +3,25 @@ import React, { FormEvent, useEffect, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; import { useQueryClient } from 'react-query'; -import Heading1 from '@components/atoms/heading1'; -import Heading2 from '@components/atoms/heading2'; -import Heading3 from '@components/atoms/heading3'; -import withAuthGuard from '@components/HOCs/withAuthGuard'; -import Button from '@components/molecules/button'; -import Checkbox from '@components/molecules/form/checkbox'; -import Select from '@components/molecules/form/select'; -import AccountNav from '@components/organisms/accountNav'; - -import styles from './preferences.module.scss'; +import Heading1 from '~components/atoms/heading1'; +import Heading2 from '~components/atoms/heading2'; +import Heading3 from '~components/atoms/heading3'; +import withAuthGuard from '~components/HOCs/withAuthGuard'; +import Button from '~components/molecules/button'; +import Checkbox from '~components/molecules/form/checkbox'; +import Select from '~components/molecules/form/select'; +import AccountNav from '~components/organisms/accountNav'; import { Language, RecordingQuality, Timezone, -} from '@src/__generated__/graphql'; +} from '~src/__generated__/graphql'; + import { useGetAccountPreferencesDataQuery, useUpdateAccountPreferencesMutation, } from './__generated__/preferences'; +import styles from './preferences.module.scss'; function Profile(): JSX.Element { const queryClient = useQueryClient(); diff --git a/src/containers/account/profile.spec.tsx b/src/containers/account/profile.spec.tsx index bac3d4ccb..c6157710a 100644 --- a/src/containers/account/profile.spec.tsx +++ b/src/containers/account/profile.spec.tsx @@ -9,20 +9,21 @@ import React from 'react'; import ReactTestUtils, { act } from 'react-dom/test-utils'; import { hydrate, QueryClient } from 'react-query'; -import { fetchApi } from '@lib/api/fetchApi'; -import { login } from '@lib/api/login'; -import { storeRequest } from '@lib/api/storeRequest'; -import { buildServerRenderer } from '@lib/test/buildServerRenderer'; -import { loadAuthGuardData } from '@lib/test/loadAuthGuardData'; -import renderWithProviders from '@lib/test/renderWithProviders'; -import Profile, { getServerSideProps } from '@pages/[language]/account/profile'; +import { fetchApi } from '~lib/api/fetchApi'; +import { login } from '~lib/api/login'; +import { storeRequest } from '~lib/api/storeRequest'; +import { buildServerRenderer } from '~lib/test/buildServerRenderer'; +import { loadAuthGuardData } from '~lib/test/loadAuthGuardData'; +import renderWithProviders from '~lib/test/renderWithProviders'; +import Profile, { getServerSideProps } from '~pages/[language]/account/profile'; + import { GetProfileDataDocument, UpdateProfileDataDocument, } from './__generated__/profile'; -jest.mock('@lib/api/login'); -jest.mock('@lib/api/storeRequest'); +jest.mock('~lib/api/login'); +jest.mock('~lib/api/storeRequest'); jest.mock('js-cookie'); const renderPage = buildServerRenderer(Profile, getServerSideProps); diff --git a/src/containers/account/profile.tsx b/src/containers/account/profile.tsx index 05c1578bc..82f2c00cb 100644 --- a/src/containers/account/profile.tsx +++ b/src/containers/account/profile.tsx @@ -3,25 +3,25 @@ import React, { FormEvent, useEffect, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; import { useQueryClient } from 'react-query'; -import Heading1 from '@components/atoms/heading1'; -import Heading2 from '@components/atoms/heading2'; -import withAuthGuard from '@components/HOCs/withAuthGuard'; -import Button from '@components/molecules/button'; -import Checkbox from '@components/molecules/form/checkbox'; -import Input from '@components/molecules/form/input'; -import AccountNav from '@components/organisms/accountNav'; -import Modal from '@components/organisms/modal'; -import { refetchUserQueries, resetUserQueries } from '@lib/api/login'; -import { clearSessionToken } from '@lib/cookies'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading1 from '~components/atoms/heading1'; +import Heading2 from '~components/atoms/heading2'; +import withAuthGuard from '~components/HOCs/withAuthGuard'; +import Button from '~components/molecules/button'; +import Checkbox from '~components/molecules/form/checkbox'; +import Input from '~components/molecules/form/input'; +import AccountNav from '~components/organisms/accountNav'; +import Modal from '~components/organisms/modal'; +import { refetchUserQueries, resetUserQueries } from '~lib/api/login'; +import { clearSessionToken } from '~lib/cookies'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import styles from './profile.module.scss'; import { useDeleteAccountMutation, useGetProfileDataQuery, useUpdateProfileDataMutation, } from './__generated__/profile'; +import styles from './profile.module.scss'; function Profile(): JSX.Element { const languageRoute = useLanguageRoute(); diff --git a/src/containers/account/register.spec.tsx b/src/containers/account/register.spec.tsx index 2fdafdf98..41af41644 100644 --- a/src/containers/account/register.spec.tsx +++ b/src/containers/account/register.spec.tsx @@ -4,9 +4,10 @@ import { when } from 'jest-when'; import Cookie from 'js-cookie'; import { __setFacebookResponse } from 'react-facebook-login/dist/facebook-login-render-props'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildRenderer } from '@lib/test/buildRenderer'; -import Register from '@pages/[language]/account/register'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildRenderer } from '~lib/test/buildRenderer'; +import Register from '~pages/[language]/account/register'; + import { RegisterDocument, RegisterSocialDocument, diff --git a/src/containers/account/register.tsx b/src/containers/account/register.tsx index f4453fe02..60fccd975 100644 --- a/src/containers/account/register.tsx +++ b/src/containers/account/register.tsx @@ -1,12 +1,12 @@ import { useRouter } from 'next/router'; import React from 'react'; -import withAuthGuard from '@components/HOCs/withAuthGuard'; -import SocialLogin from '@components/molecules/socialLogin'; -import RegisterForm from '@components/organisms/registerForm'; -import AndOnboarding from '@components/templates/andOnboarding'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import withAuthGuard from '~components/HOCs/withAuthGuard'; +import SocialLogin from '~components/molecules/socialLogin'; +import RegisterForm from '~components/organisms/registerForm'; +import AndOnboarding from '~components/templates/andOnboarding'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import LoginRedirect from './loginRedirect'; diff --git a/src/containers/account/reset.spec.tsx b/src/containers/account/reset.spec.tsx index 6071a8185..80d9a7585 100644 --- a/src/containers/account/reset.spec.tsx +++ b/src/containers/account/reset.spec.tsx @@ -3,15 +3,15 @@ import userEvent from '@testing-library/user-event'; import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; +import { LoginDocument } from '~lib/api/__generated__/login'; +import { fetchApi } from '~lib/api/fetchApi'; +import { sleep } from '~lib/sleep'; +import { buildRenderer } from '~lib/test/buildRenderer'; +import loadControlledPromise from '~lib/test/loadControlledPromise'; +import withMutedReactQueryLogger from '~lib/test/withMutedReactQueryLogger'; +import Reset from '~pages/[language]/account/reset'; -import { sleep } from '@lib/sleep'; -import { buildRenderer } from '@lib/test/buildRenderer'; -import withMutedReactQueryLogger from '@lib/test/withMutedReactQueryLogger'; -import Reset from '@pages/[language]/account/reset'; -import loadControlledPromise from '@lib/test/loadControlledPromise'; import { ResetPasswordDocument } from './__generated__/reset'; -import { LoginDocument } from '@lib/api/__generated__/login'; const renderPage = buildRenderer(Reset); diff --git a/src/containers/account/reset.tsx b/src/containers/account/reset.tsx index be84ac70c..5376e747b 100644 --- a/src/containers/account/reset.tsx +++ b/src/containers/account/reset.tsx @@ -2,19 +2,17 @@ import { useRouter } from 'next/router'; import React, { FormEvent, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Alert from '@components/atoms/alert'; -import Button from '@components/molecules/button'; -import Input from '@components/molecules/form/input'; -import { login } from '@lib/api/login'; - -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; -import { useQueryString } from '@lib/useQueryString'; +import Alert from '~components/atoms/alert'; +import Button from '~components/molecules/button'; +import Input from '~components/molecules/form/input'; +import { login } from '~lib/api/login'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; +import { useQueryString } from '~lib/useQueryString'; import LogoLarge from '../../../public/img/logo-large.svg'; - -import styles from './reset.module.scss'; import { useResetPasswordMutation } from './__generated__/reset'; +import styles from './reset.module.scss'; function Reset(): JSX.Element { const router = useRouter(); diff --git a/src/containers/audiobook/__generated__/detail.ts b/src/containers/audiobook/__generated__/detail.ts index bec2c107e..b6b83cbf1 100644 --- a/src/containers/audiobook/__generated__/detail.ts +++ b/src/containers/audiobook/__generated__/detail.ts @@ -10,7 +10,7 @@ import { AndMiniplayerFragmentDoc } from '../../../components/templates/__genera import { GenerateFeedFragmentDoc } from '../../../lib/__generated__/generateFeed'; import { BookFeedDescriptionFragmentDoc } from '../../../pages/[language]/books/[id]/feed.xml/__generated__/bookFeedDescription'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetAudiobookDetailPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -115,7 +115,7 @@ export const useGetAudiobookDetailPathsDataQuery = < graphqlFetcher(GetAudiobookDetailPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getAudiobookDetailPageData( variables: ExactAlt diff --git a/src/containers/audiobook/__generated__/list.ts b/src/containers/audiobook/__generated__/list.ts index bc3f88aa3..06c3fa9ad 100644 --- a/src/containers/audiobook/__generated__/list.ts +++ b/src/containers/audiobook/__generated__/list.ts @@ -3,7 +3,7 @@ import * as Types from '../../../__generated__/graphql'; import { CardSequenceFragmentDoc } from '../../../components/molecules/card/__generated__/sequence'; import { PersonLockupFragmentDoc } from '../../../components/molecules/__generated__/personLockup'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetAudiobookListPageDataQueryVariables = Types.Exact<{ language: Types.Language; first?: Types.InputMaybe; @@ -72,7 +72,7 @@ export const useGetAudiobookListPathsDataQuery = < graphqlFetcher(GetAudiobookListPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getAudiobookListPageData( variables: ExactAlt diff --git a/src/containers/audiobook/detail.ts b/src/containers/audiobook/detail.ts index f1e039df3..7cd807471 100644 --- a/src/containers/audiobook/detail.ts +++ b/src/containers/audiobook/detail.ts @@ -1,5 +1,6 @@ -import withFailStates from '@components/HOCs/withFailStates'; -import { Sequence } from '@components/organisms/sequence'; +import withFailStates from '~components/HOCs/withFailStates'; +import { Sequence } from '~components/organisms/sequence'; + import { GetAudiobookDetailPageDataQuery } from './__generated__/detail'; export interface AudiobookDetailProps { diff --git a/src/containers/audiobook/list.spec.tsx b/src/containers/audiobook/list.spec.tsx index 2ffacfaad..0c6c84b52 100644 --- a/src/containers/audiobook/list.spec.tsx +++ b/src/containers/audiobook/list.spec.tsx @@ -2,14 +2,15 @@ import { when } from 'jest-when'; import { __loadRouter } from 'next/router'; import React from 'react'; -import { fetchApi } from '@lib/api/fetchApi'; -import { ENTRIES_PER_PAGE } from '@lib/constants'; -import renderWithProviders from '@lib/test/renderWithProviders'; +import { fetchApi } from '~lib/api/fetchApi'; +import { ENTRIES_PER_PAGE } from '~lib/constants'; +import renderWithProviders from '~lib/test/renderWithProviders'; import AudiobooksList, { getStaticPaths, getStaticProps, -} from '@pages/[language]/books/page/[i]'; -import { SequenceContentType } from '@src/__generated__/graphql'; +} from '~pages/[language]/books/page/[i]'; +import { SequenceContentType } from '~src/__generated__/graphql'; + import { GetAudiobookListPageDataDocument, GetAudiobookListPageDataQuery, diff --git a/src/containers/audiobook/list.tsx b/src/containers/audiobook/list.tsx index 729ef9940..1349076f6 100644 --- a/src/containers/audiobook/list.tsx +++ b/src/containers/audiobook/list.tsx @@ -1,13 +1,13 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardSequence from '@components/molecules/card/sequence'; -import PaginatedCardList from '@components/organisms/paginatedCardList'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardSequence from '~components/molecules/card/sequence'; +import PaginatedCardList from '~components/organisms/paginatedCardList'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; import { GetAudiobookListPageDataQuery } from './__generated__/list'; export type AudiobooksListProps = PaginatedProps< diff --git a/src/containers/audiobook/tracks/__generated__/detail.ts b/src/containers/audiobook/tracks/__generated__/detail.ts index 69b8c9dd7..b8e148ef9 100644 --- a/src/containers/audiobook/tracks/__generated__/detail.ts +++ b/src/containers/audiobook/tracks/__generated__/detail.ts @@ -10,7 +10,7 @@ import { PlayerFragmentDoc } from '../../../../components/molecules/__generated_ import { ButtonDownloadFragmentDoc } from '../../../../components/molecules/__generated__/buttonDownload'; import { ButtonShareRecordingFragmentDoc } from '../../../../components/molecules/__generated__/buttonShareRecording'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetAudiobookTrackDetailDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -76,7 +76,7 @@ export const useGetAudiobookTrackDetailStaticPathsQuery = < graphqlFetcher(GetAudiobookTrackDetailStaticPathsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getAudiobookTrackDetailData( variables: ExactAlt diff --git a/src/containers/audiobook/tracks/detail.ts b/src/containers/audiobook/tracks/detail.ts index a58a1ba7e..51b984dd2 100644 --- a/src/containers/audiobook/tracks/detail.ts +++ b/src/containers/audiobook/tracks/detail.ts @@ -1,5 +1,6 @@ -import withFailStates from '@components/HOCs/withFailStates'; -import { Recording } from '@components/organisms/recording'; +import withFailStates from '~components/HOCs/withFailStates'; +import { Recording } from '~components/organisms/recording'; + import { GetAudiobookTrackDetailDataQuery } from './__generated__/detail'; export interface AudiobookTrackDetailProps { diff --git a/src/containers/base.media.spec.tsx b/src/containers/base.media.spec.tsx index 14b7a2bdf..e3ec5bfd8 100644 --- a/src/containers/base.media.spec.tsx +++ b/src/containers/base.media.spec.tsx @@ -15,15 +15,15 @@ import React from 'react'; import ReactTestUtils from 'react-dom/test-utils'; import videojs from 'video.js'; -import { Recording } from '@components/organisms/recording'; -import setPlayerMock from '@lib/test/setPlayerMock'; -import MyApp from '@pages/_app'; -import { __awaitIntlMessages } from '@lib/getIntlMessages'; -import { RecordingFragment } from '@components/organisms/__generated__/recording'; +import { RecordingFragment } from '~components/organisms/__generated__/recording'; +import { Recording } from '~components/organisms/recording'; +import { __awaitIntlMessages } from '~lib/getIntlMessages'; +import setPlayerMock from '~lib/test/setPlayerMock'; +import MyApp from '~pages/_app'; import { RecordingContentType, SequenceContentType, -} from '@src/__generated__/graphql'; +} from '~src/__generated__/graphql'; const sequence = { id: 'the_sequence_id', diff --git a/src/containers/base.spec.tsx b/src/containers/base.spec.tsx index 4eca0b1da..f3504cb6b 100644 --- a/src/containers/base.spec.tsx +++ b/src/containers/base.spec.tsx @@ -3,8 +3,8 @@ import { __loadRouter } from 'next/router'; import React from 'react'; import { dehydrate, QueryClient, useQuery } from 'react-query'; -import MyApp from '@pages/_app'; -import { __awaitIntlMessages } from '@lib/getIntlMessages'; +import { __awaitIntlMessages } from '~lib/getIntlMessages'; +import MyApp from '~pages/_app'; const renderApp = async (component: any, props: any) => { const view = render(); diff --git a/src/containers/base.tsx b/src/containers/base.tsx index e18cd4427..4b95b12ee 100644 --- a/src/containers/base.tsx +++ b/src/containers/base.tsx @@ -8,12 +8,12 @@ import { QueryClientProvider, } from 'react-query'; -import withIntl from '@components/HOCs/withIntl'; -import LoadingIndicator from '@components/molecules/loadingIndicator'; -import AndGlobalModals from '@components/templates/andGlobalModals'; -import AndMiniplayer from '@components/templates/andMiniplayer'; -import AndNavigation from '@components/templates/andNavigation'; -import AndPlaybackContext from '@components/templates/andPlaybackContext'; +import withIntl from '~components/HOCs/withIntl'; +import LoadingIndicator from '~components/molecules/loadingIndicator'; +import AndGlobalModals from '~components/templates/andGlobalModals'; +import AndMiniplayer from '~components/templates/andMiniplayer'; +import AndNavigation from '~components/templates/andNavigation'; +import AndPlaybackContext from '~components/templates/andPlaybackContext'; import styles from './base.module.scss'; diff --git a/src/containers/bible/__generated__/book.ts b/src/containers/bible/__generated__/book.ts index 88979405b..c6a199af7 100644 --- a/src/containers/bible/__generated__/book.ts +++ b/src/containers/bible/__generated__/book.ts @@ -10,7 +10,7 @@ import { PlayerFragmentDoc } from '../../../components/molecules/__generated__/p import { ButtonDownloadFragmentDoc } from '../../../components/molecules/__generated__/buttonDownload'; import { ButtonShareRecordingFragmentDoc } from '../../../components/molecules/__generated__/buttonShareRecording'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetAudiobibleBookDetailDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -75,7 +75,7 @@ export const useGetAudiobibleBookPathsDataQuery = < graphqlFetcher(GetAudiobibleBookPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getAudiobibleBookDetailData( variables: ExactAlt diff --git a/src/containers/bible/__generated__/version.ts b/src/containers/bible/__generated__/version.ts index 541974103..1f44a57a4 100644 --- a/src/containers/bible/__generated__/version.ts +++ b/src/containers/bible/__generated__/version.ts @@ -3,7 +3,7 @@ import * as Types from '../../../__generated__/graphql'; import { CardSequenceFragmentDoc } from '../../../components/molecules/card/__generated__/sequence'; import { PersonLockupFragmentDoc } from '../../../components/molecules/__generated__/personLockup'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetAudiobibleVersionDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -46,7 +46,7 @@ export const useGetAudiobibleVersionDataQuery = < graphqlFetcher(GetAudiobibleVersionDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getAudiobibleVersionData( variables: ExactAlt diff --git a/src/containers/bible/__generated__/versions.ts b/src/containers/bible/__generated__/versions.ts index 3bd8a68f5..ac99967bf 100644 --- a/src/containers/bible/__generated__/versions.ts +++ b/src/containers/bible/__generated__/versions.ts @@ -4,7 +4,7 @@ import { CardCollectionFragmentDoc } from '../../../components/molecules/card/__ import { CardSequenceFragmentDoc } from '../../../components/molecules/card/__generated__/sequence'; import { PersonLockupFragmentDoc } from '../../../components/molecules/__generated__/personLockup'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetAudiobibleVersionsDataQueryVariables = Types.Exact<{ language: Types.Language; }>; @@ -49,7 +49,7 @@ export const useGetAudiobibleVersionsDataQuery = < graphqlFetcher(GetAudiobibleVersionsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getAudiobibleVersionsData( variables: ExactAlt diff --git a/src/containers/bible/book.spec.tsx b/src/containers/bible/book.spec.tsx index 11bfebb16..2b1c49ad7 100644 --- a/src/containers/bible/book.spec.tsx +++ b/src/containers/bible/book.spec.tsx @@ -4,18 +4,18 @@ import { __loadRouter } from 'next/router'; import React from 'react'; import videojs from 'video.js'; -import AndMiniplayer from '@components/templates/andMiniplayer'; -import AndPlaybackContext from '@components/templates/andPlaybackContext'; -import { BookProps } from '@containers/bible/book'; -import * as bibleBrain from '@lib/api/bibleBrain'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; -import setPlayerMock from '@lib/test/setPlayerMock'; +import AndMiniplayer from '~components/templates/andMiniplayer'; +import AndPlaybackContext from '~components/templates/andPlaybackContext'; +import { BookProps } from '~containers/bible/book'; +import * as bibleBrain from '~lib/api/bibleBrain'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; +import setPlayerMock from '~lib/test/setPlayerMock'; import Book, { getStaticPaths, getStaticProps, -} from '@pages/[language]/bibles/[id]/[book]/[chapter]'; +} from '~pages/[language]/bibles/[id]/[book]/[chapter]'; -jest.mock('@lib/api/bibleBrain'); +jest.mock('~lib/api/bibleBrain'); jest.mock('video.js'); const renderPage = buildStaticRenderer((props: BookProps) => { diff --git a/src/containers/bible/book.tsx b/src/containers/bible/book.tsx index af3a4d1fd..93361c3a4 100644 --- a/src/containers/bible/book.tsx +++ b/src/containers/bible/book.tsx @@ -3,36 +3,35 @@ import { useRouter } from 'next/router'; import React, { useContext, useEffect, useMemo, useRef, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import LineHeading from '@components/atoms/lineHeading'; -import withFailStates from '@components/HOCs/withFailStates'; -import BibleVersionTypeLockup from '@components/molecules/bibleVersionTypeLockup'; -import Button from '@components/molecules/button'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; +import Heading1 from '~components/atoms/heading1'; +import LineHeading from '~components/atoms/lineHeading'; +import withFailStates from '~components/HOCs/withFailStates'; +import { PlayerFragment } from '~components/molecules/__generated__/player'; +import { SequenceNavFragment } from '~components/molecules/__generated__/sequenceNav'; +import BibleVersionTypeLockup from '~components/molecules/bibleVersionTypeLockup'; +import Button from '~components/molecules/button'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; import DefinitionList, { IDefinitionListTerm, -} from '@components/molecules/definitionList'; -import Player from '@components/molecules/player'; -import SequenceNav from '@components/molecules/sequenceNav'; -import Tease from '@components/molecules/tease'; -import TeaseRecording from '@components/molecules/teaseRecording'; -import { PlaybackContext } from '@components/templates/andPlaybackContext'; +} from '~components/molecules/definitionList'; +import Player from '~components/molecules/player'; +import SequenceNav from '~components/molecules/sequenceNav'; +import Tease from '~components/molecules/tease'; +import TeaseRecording from '~components/molecules/teaseRecording'; +import { PlaybackContext } from '~components/templates/andPlaybackContext'; import { IBibleBook, IBibleBookChapter, IBibleVersion, -} from '@lib/api/bibleBrain'; -import { BaseColors } from '@lib/constants'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +} from '~lib/api/bibleBrain'; +import { BaseColors } from '~lib/constants'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; +import { RecordingContentType } from '~src/__generated__/graphql'; import IconBack from '../../../public/img/icons/icon-back-light.svg'; import IconBlog from '../../../public/img/icons/icon-blog-light-small.svg'; - import styles from './book.module.scss'; -import { PlayerFragment } from '@components/molecules/__generated__/player'; -import { SequenceNavFragment } from '@components/molecules/__generated__/sequenceNav'; -import { RecordingContentType } from '@src/__generated__/graphql'; export interface BookProps { version: IBibleVersion; diff --git a/src/containers/bible/version.spec.tsx b/src/containers/bible/version.spec.tsx index 2b8f8f4ca..97882fd5c 100644 --- a/src/containers/bible/version.spec.tsx +++ b/src/containers/bible/version.spec.tsx @@ -1,17 +1,17 @@ +import { screen } from '@testing-library/react'; import React from 'react'; -import * as bibleBrain from '@lib/api/bibleBrain'; - -import { buildLoader } from '@lib/test/buildLoader'; -import renderWithProviders from '@lib/test/renderWithProviders'; +import * as bibleBrain from '~lib/api/bibleBrain'; +import { buildLoader } from '~lib/test/buildLoader'; +import renderWithProviders from '~lib/test/renderWithProviders'; import Version, { getStaticPaths, getStaticProps, -} from '@pages/[language]/bibles/[id]/[[...slugs]]'; -import { screen } from '@testing-library/react'; +} from '~pages/[language]/bibles/[id]/[[...slugs]]'; + import { GetAudiobibleVersionsDataDocument } from './__generated__/versions'; -jest.mock('@lib/api/bibleBrain'); +jest.mock('~lib/api/bibleBrain'); async function renderPage() { const { props } = (await getStaticProps({ diff --git a/src/containers/bible/version.tsx b/src/containers/bible/version.tsx index a5aba58af..7fcd5822b 100644 --- a/src/containers/bible/version.tsx +++ b/src/containers/bible/version.tsx @@ -2,24 +2,24 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import Heading6 from '@components/atoms/heading6'; -import HorizontalRule from '@components/atoms/horizontalRule'; -import withFailStates from '@components/HOCs/withFailStates'; -import BibleVersionTypeLockup from '@components/molecules/bibleVersionTypeLockup'; -import CardBibleBook from '@components/molecules/card/bibleBook'; -import CardSequence from '@components/molecules/card/sequence'; -import CardGroup from '@components/molecules/cardGroup'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; +import Heading1 from '~components/atoms/heading1'; +import Heading6 from '~components/atoms/heading6'; +import HorizontalRule from '~components/atoms/horizontalRule'; +import withFailStates from '~components/HOCs/withFailStates'; +import BibleVersionTypeLockup from '~components/molecules/bibleVersionTypeLockup'; +import CardBibleBook from '~components/molecules/card/bibleBook'; +import CardSequence from '~components/molecules/card/sequence'; +import CardGroup from '~components/molecules/cardGroup'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; import DefinitionList, { IDefinitionListTerm, -} from '@components/molecules/definitionList'; -import Tease from '@components/molecules/tease'; -import { IBibleVersion } from '@lib/api/bibleBrain'; -import { BaseColors } from '@lib/constants'; +} from '~components/molecules/definitionList'; +import Tease from '~components/molecules/tease'; +import { IBibleVersion } from '~lib/api/bibleBrain'; +import { BaseColors } from '~lib/constants'; -import styles from './version.module.scss'; import { GetAudiobibleVersionDataQuery } from './__generated__/version'; +import styles from './version.module.scss'; export interface VersionProps { version: IBibleVersion | GetAudiobibleVersionDataQuery['collection']; diff --git a/src/containers/bible/versions.spec.tsx b/src/containers/bible/versions.spec.tsx index e60c8e640..c30ecd071 100644 --- a/src/containers/bible/versions.spec.tsx +++ b/src/containers/bible/versions.spec.tsx @@ -1,16 +1,16 @@ import React from 'react'; -import * as bibleBrain from '@lib/api/bibleBrain'; - -import { buildLoader } from '@lib/test/buildLoader'; -import renderWithProviders from '@lib/test/renderWithProviders'; +import * as bibleBrain from '~lib/api/bibleBrain'; +import { buildLoader } from '~lib/test/buildLoader'; +import renderWithProviders from '~lib/test/renderWithProviders'; import Versions, { getStaticPaths, getStaticProps, -} from '@pages/[language]/bibles'; +} from '~pages/[language]/bibles'; + import { GetAudiobibleVersionsDataDocument } from './__generated__/versions'; -jest.mock('@lib/api/bibleBrain'); +jest.mock('~lib/api/bibleBrain'); async function renderPage() { const { props } = (await getStaticProps({})) as any; diff --git a/src/containers/bible/versions.tsx b/src/containers/bible/versions.tsx index 218bd5f3f..23fe931d6 100644 --- a/src/containers/bible/versions.tsx +++ b/src/containers/bible/versions.tsx @@ -1,17 +1,17 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardBibleVersion from '@components/molecules/card/bibleVersion'; -import CardCollection from '@components/molecules/card/collection'; -import CardMasonry from '@components/molecules/cardMasonry'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import Tease from '@components/molecules/tease'; -import { IBibleVersion } from '@lib/api/bibleBrain'; +import Heading1 from '~components/atoms/heading1'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardBibleVersion from '~components/molecules/card/bibleVersion'; +import CardCollection from '~components/molecules/card/collection'; +import CardMasonry from '~components/molecules/cardMasonry'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import Tease from '~components/molecules/tease'; +import { IBibleVersion } from '~lib/api/bibleBrain'; -import styles from './versions.module.scss'; import { GetAudiobibleVersionsDataQuery } from './__generated__/versions'; +import styles from './versions.module.scss'; export interface VersionsProps { versions: Array< diff --git a/src/containers/blog.tsx b/src/containers/blog.tsx index 187462469..78e2fb4d1 100644 --- a/src/containers/blog.tsx +++ b/src/containers/blog.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardPost from '@components/molecules/card/post'; -import CardGroup from '@components/molecules/cardGroup'; -import Pagination from '@components/molecules/pagination'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardPost from '~components/molecules/card/post'; +import CardGroup from '~components/molecules/cardGroup'; +import Pagination from '~components/molecules/pagination'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; import { GetBlogPageDataQuery } from './__generated__/blog'; export type BlogProps = PaginatedProps< diff --git a/src/containers/blog/__generated__/detail.ts b/src/containers/blog/__generated__/detail.ts index 66502d261..a601cb28e 100644 --- a/src/containers/blog/__generated__/detail.ts +++ b/src/containers/blog/__generated__/detail.ts @@ -2,7 +2,7 @@ import * as Types from '../../../__generated__/graphql'; import { CardPostFragmentDoc } from '../../../components/molecules/card/__generated__/post'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetBlogDetailDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; language: Types.Language; @@ -80,7 +80,7 @@ export const useGetBlogDetailStaticPathsQuery = < graphqlFetcher(GetBlogDetailStaticPathsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getBlogDetailData( variables: ExactAlt diff --git a/src/containers/blog/detail.spec.tsx b/src/containers/blog/detail.spec.tsx index 83c1a651a..3227f028a 100644 --- a/src/containers/blog/detail.spec.tsx +++ b/src/containers/blog/detail.spec.tsx @@ -1,18 +1,19 @@ import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildLoader } from '@lib/test/buildLoader'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildLoader } from '~lib/test/buildLoader'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import BlogPostDetail, { getStaticPaths, getStaticProps, -} from '@pages/[language]/blog/[id]/[[...slugs]]'; +} from '~pages/[language]/blog/[id]/[[...slugs]]'; +import { Language } from '~src/__generated__/graphql'; + import { GetBlogDetailDataDocument, GetBlogDetailStaticPathsDocument, } from './__generated__/detail'; -import { Language } from '@src/__generated__/graphql'; const renderPage = buildStaticRenderer(BlogPostDetail, getStaticProps); diff --git a/src/containers/blog/detail.tsx b/src/containers/blog/detail.tsx index a424e5cc9..fddde746c 100644 --- a/src/containers/blog/detail.tsx +++ b/src/containers/blog/detail.tsx @@ -2,18 +2,17 @@ import Image from 'next/legacy/image'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import HorizontalRule from '@components/atoms/horizontalRule'; -import LineHeading from '@components/atoms/lineHeading'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardColumn from '@components/molecules/card/column'; -import CardPost from '@components/molecules/card/post'; -import { BaseColors } from '@lib/constants'; -import { formatLongDate } from '@lib/date'; +import HorizontalRule from '~components/atoms/horizontalRule'; +import LineHeading from '~components/atoms/lineHeading'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardColumn from '~components/molecules/card/column'; +import CardPost from '~components/molecules/card/post'; +import { BaseColors } from '~lib/constants'; +import { formatLongDate } from '~lib/date'; +import { useFormattedDuration } from '~lib/time'; -import { useFormattedDuration } from '@lib/time'; - -import styles from './detail.module.scss'; import { GetBlogDetailDataQuery } from './__generated__/detail'; +import styles from './detail.module.scss'; export type BlogPost = NonNullable; diff --git a/src/containers/collection/__generated__/detail.ts b/src/containers/collection/__generated__/detail.ts index 9dcaacf1e..9044254c1 100644 --- a/src/containers/collection/__generated__/detail.ts +++ b/src/containers/collection/__generated__/detail.ts @@ -11,7 +11,7 @@ import { TeaseRecordingFragmentDoc } from '../../../components/molecules/__gener import { AndMiniplayerFragmentDoc } from '../../../components/templates/__generated__/andMiniplayer'; import { GenerateFeedFragmentDoc } from '../../../lib/__generated__/generateFeed'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetCollectionDetailPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -173,7 +173,7 @@ export const useGetCollectionDetailPathsDataQuery = < graphqlFetcher(GetCollectionDetailPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getCollectionDetailPageData( variables: ExactAlt diff --git a/src/containers/collection/__generated__/list.ts b/src/containers/collection/__generated__/list.ts index 615b38ff8..cbb68c1e4 100644 --- a/src/containers/collection/__generated__/list.ts +++ b/src/containers/collection/__generated__/list.ts @@ -2,7 +2,7 @@ import * as Types from '../../../__generated__/graphql'; import { CardCollectionFragmentDoc } from '../../../components/molecules/card/__generated__/collection'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetCollectionListPageDataQueryVariables = Types.Exact<{ language: Types.Language; offset: Types.InputMaybe; @@ -70,7 +70,7 @@ export const useGetCollectionListPathsDataQuery = < graphqlFetcher(GetCollectionListPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getCollectionListPageData( variables: ExactAlt diff --git a/src/containers/collection/__generated__/presenters.ts b/src/containers/collection/__generated__/presenters.ts index 74861892a..d1f909af8 100644 --- a/src/containers/collection/__generated__/presenters.ts +++ b/src/containers/collection/__generated__/presenters.ts @@ -3,7 +3,7 @@ import * as Types from '../../../__generated__/graphql'; import { CollectionPivotFragmentDoc } from './pivot'; import { CardPersonFragmentDoc } from '../../../components/molecules/card/__generated__/person'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetCollectionPresentersPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; offset: Types.InputMaybe; @@ -48,7 +48,7 @@ export const useGetCollectionPresentersPageDataQuery = < graphqlFetcher(GetCollectionPresentersPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getCollectionPresentersPageData( variables: ExactAlt diff --git a/src/containers/collection/__generated__/sequences.ts b/src/containers/collection/__generated__/sequences.ts index d04acf3ac..189223206 100644 --- a/src/containers/collection/__generated__/sequences.ts +++ b/src/containers/collection/__generated__/sequences.ts @@ -4,7 +4,7 @@ import { CollectionPivotFragmentDoc } from './pivot'; import { CardSequenceFragmentDoc } from '../../../components/molecules/card/__generated__/sequence'; import { PersonLockupFragmentDoc } from '../../../components/molecules/__generated__/personLockup'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetCollectionSequencesPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; offset: Types.InputMaybe; @@ -49,7 +49,7 @@ export const useGetCollectionSequencesPageDataQuery = < graphqlFetcher(GetCollectionSequencesPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getCollectionSequencesPageData( variables: ExactAlt diff --git a/src/containers/collection/__generated__/teachings.ts b/src/containers/collection/__generated__/teachings.ts index 93afc8d69..0882cd255 100644 --- a/src/containers/collection/__generated__/teachings.ts +++ b/src/containers/collection/__generated__/teachings.ts @@ -8,7 +8,7 @@ import { CardHatSponsorFragmentDoc } from '../../../components/molecules/card/ha import { TeaseRecordingFragmentDoc } from '../../../components/molecules/__generated__/teaseRecording'; import { AndMiniplayerFragmentDoc } from '../../../components/templates/__generated__/andMiniplayer'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetCollectionTeachingsPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; offset: Types.InputMaybe; @@ -58,7 +58,7 @@ export const useGetCollectionTeachingsPageDataQuery = < graphqlFetcher(GetCollectionTeachingsPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getCollectionTeachingsPageData( variables: ExactAlt diff --git a/src/containers/collection/detail.spec.tsx b/src/containers/collection/detail.spec.tsx index 60712b007..f9577da2e 100644 --- a/src/containers/collection/detail.spec.tsx +++ b/src/containers/collection/detail.spec.tsx @@ -1,17 +1,18 @@ import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import CollectionDetail, { getStaticPaths, getStaticProps, -} from '@pages/[language]/conferences/[id]/[[...slug]]'; +} from '~pages/[language]/conferences/[id]/[[...slug]]'; +import { Language, SequenceContentType } from '~src/__generated__/graphql'; + import { GetCollectionDetailPageDataDocument, GetCollectionDetailPathsDataDocument, } from './__generated__/detail'; -import { Language, SequenceContentType } from '@src/__generated__/graphql'; const renderPage = buildStaticRenderer(CollectionDetail, getStaticProps); diff --git a/src/containers/collection/detail.tsx b/src/containers/collection/detail.tsx index e7cd61918..50af27843 100644 --- a/src/containers/collection/detail.tsx +++ b/src/containers/collection/detail.tsx @@ -3,37 +3,35 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import HorizontalRule from '@components/atoms/horizontalRule'; -import InherentSizeImage from '@components/atoms/inherentSizeImage'; -import LineHeading from '@components/atoms/lineHeading'; -import withFailStates from '@components/HOCs/withFailStates'; -import Button from '@components/molecules/button'; -import ButtonFavorite from '@components/molecules/buttonFavorite'; -import ButtonShare from '@components/molecules/buttonShare'; -import CardPerson from '@components/molecules/card/person'; -import CardRecording from '@components/molecules/card/recording'; -import CardSequence from '@components/molecules/card/sequence'; -import CardGroup from '@components/molecules/cardGroup'; -import CollectionTypeLockup from '@components/molecules/collectionTypeLockup'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import HorizontalRule from '~components/atoms/horizontalRule'; +import InherentSizeImage from '~components/atoms/inherentSizeImage'; +import LineHeading from '~components/atoms/lineHeading'; +import withFailStates from '~components/HOCs/withFailStates'; +import Button from '~components/molecules/button'; +import ButtonFavorite from '~components/molecules/buttonFavorite'; +import ButtonShare from '~components/molecules/buttonShare'; +import CardPerson from '~components/molecules/card/person'; +import CardRecording from '~components/molecules/card/recording'; +import CardSequence from '~components/molecules/card/sequence'; +import CardGroup from '~components/molecules/cardGroup'; +import CollectionTypeLockup from '~components/molecules/collectionTypeLockup'; import DefinitionList, { IDefinitionListTerm, -} from '@components/molecules/definitionList'; -import SponsorLockup from '@components/molecules/sponsorLockup'; -import Tease from '@components/molecules/tease'; -import { useIsCollectionFavorited } from '@lib/api/useIsCollectionFavorited'; -import { BaseColors } from '@lib/constants'; -import { formatDateRange } from '@lib/date'; - -import root from '@lib/routes'; -import { useFormattedDuration } from '@lib/time'; -import useLanguageRoute from '@lib/useLanguageRoute'; +} from '~components/molecules/definitionList'; +import SponsorLockup from '~components/molecules/sponsorLockup'; +import Tease from '~components/molecules/tease'; +import { useIsCollectionFavorited } from '~lib/api/useIsCollectionFavorited'; +import { BaseColors } from '~lib/constants'; +import { formatDateRange } from '~lib/date'; +import root from '~lib/routes'; +import { useFormattedDuration } from '~lib/time'; +import useLanguageRoute from '~lib/useLanguageRoute'; import ForwardIcon from '../../../public/img/icons/icon-forward-light.svg'; - -import styles from './detail.module.scss'; import { GetCollectionDetailPageDataQuery } from './__generated__/detail'; +import styles from './detail.module.scss'; export type CollectionDetailProps = GetCollectionDetailPageDataQuery; diff --git a/src/containers/collection/list.spec.tsx b/src/containers/collection/list.spec.tsx index f4b609e38..3009c6d39 100644 --- a/src/containers/collection/list.spec.tsx +++ b/src/containers/collection/list.spec.tsx @@ -1,12 +1,13 @@ import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import CollectionList, { getStaticPaths, getStaticProps, -} from '@pages/[language]/conferences/page/[i]'; +} from '~pages/[language]/conferences/page/[i]'; + import { GetCollectionListPageDataDocument, GetCollectionListPathsDataDocument, diff --git a/src/containers/collection/list.tsx b/src/containers/collection/list.tsx index 33e5f25e3..2b74e2fbf 100644 --- a/src/containers/collection/list.tsx +++ b/src/containers/collection/list.tsx @@ -1,13 +1,13 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardCollection from '@components/molecules/card/collection'; -import PaginatedCardList from '@components/organisms/paginatedCardList'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardCollection from '~components/molecules/card/collection'; +import PaginatedCardList from '~components/organisms/paginatedCardList'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; import { GetCollectionListPageDataQuery } from './__generated__/list'; export type CollectionListProps = PaginatedProps< diff --git a/src/containers/collection/pivot.tsx b/src/containers/collection/pivot.tsx index b47c5a2f0..80b976bdd 100644 --- a/src/containers/collection/pivot.tsx +++ b/src/containers/collection/pivot.tsx @@ -1,13 +1,13 @@ import React, { PropsWithChildren } from 'react'; -import Heading2 from '@components/atoms/heading2'; -import ButtonBack from '@components/molecules/buttonBack'; -import CollectionTypeLockup from '@components/molecules/collectionTypeLockup'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import Tease from '@components/molecules/tease'; +import Heading2 from '~components/atoms/heading2'; +import ButtonBack from '~components/molecules/buttonBack'; +import CollectionTypeLockup from '~components/molecules/collectionTypeLockup'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import Tease from '~components/molecules/tease'; -import styles from './pivot.module.scss'; import { CollectionPivotFragment } from './__generated__/pivot'; +import styles from './pivot.module.scss'; type Props = { collection: CollectionPivotFragment; diff --git a/src/containers/collection/presenters.tsx b/src/containers/collection/presenters.tsx index 3c9bebaa0..aebf9cd0f 100644 --- a/src/containers/collection/presenters.tsx +++ b/src/containers/collection/presenters.tsx @@ -1,18 +1,18 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import LineHeading from '@components/atoms/lineHeading'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardPerson from '@components/molecules/card/person'; -import CardGroup from '@components/molecules/cardGroup'; -import Pagination from '@components/molecules/pagination'; -import { BaseColors } from '@lib/constants'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; +import LineHeading from '~components/atoms/lineHeading'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardPerson from '~components/molecules/card/person'; +import CardGroup from '~components/molecules/cardGroup'; +import Pagination from '~components/molecules/pagination'; +import { BaseColors } from '~lib/constants'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; -import CollectionPivot from './pivot'; import { CollectionPivotFragment } from './__generated__/pivot'; import { GetCollectionPresentersPageDataQuery } from './__generated__/presenters'; +import CollectionPivot from './pivot'; export type CollectionPresentersProps = PaginatedProps< NonNullable< diff --git a/src/containers/collection/sequences.tsx b/src/containers/collection/sequences.tsx index 0b93ba631..77093b766 100644 --- a/src/containers/collection/sequences.tsx +++ b/src/containers/collection/sequences.tsx @@ -1,18 +1,18 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import LineHeading from '@components/atoms/lineHeading'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardSequence from '@components/molecules/card/sequence'; -import CardGroup from '@components/molecules/cardGroup'; -import Pagination from '@components/molecules/pagination'; -import { BaseColors } from '@lib/constants'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; +import LineHeading from '~components/atoms/lineHeading'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardSequence from '~components/molecules/card/sequence'; +import CardGroup from '~components/molecules/cardGroup'; +import Pagination from '~components/molecules/pagination'; +import { BaseColors } from '~lib/constants'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; -import CollectionPivot from './pivot'; -import { GetCollectionSequencesPageDataQuery } from './__generated__/sequences'; import { CollectionPivotFragment } from './__generated__/pivot'; +import { GetCollectionSequencesPageDataQuery } from './__generated__/sequences'; +import CollectionPivot from './pivot'; export type CollectionSequencesProps = PaginatedProps< NonNullable< diff --git a/src/containers/collection/teachings.tsx b/src/containers/collection/teachings.tsx index 8bbfc259c..3902ef15f 100644 --- a/src/containers/collection/teachings.tsx +++ b/src/containers/collection/teachings.tsx @@ -1,18 +1,18 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import LineHeading from '@components/atoms/lineHeading'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardRecording from '@components/molecules/card/recording'; -import CardGroup from '@components/molecules/cardGroup'; -import Pagination from '@components/molecules/pagination'; -import { BaseColors } from '@lib/constants'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; +import LineHeading from '~components/atoms/lineHeading'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardRecording from '~components/molecules/card/recording'; +import CardGroup from '~components/molecules/cardGroup'; +import Pagination from '~components/molecules/pagination'; +import { BaseColors } from '~lib/constants'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; -import CollectionPivot from './pivot'; import { CollectionPivotFragment } from './__generated__/pivot'; import { GetCollectionTeachingsPageDataQuery } from './__generated__/teachings'; +import CollectionPivot from './pivot'; export type CollectionTeachingsProps = PaginatedProps< NonNullable< diff --git a/src/containers/contact.tsx b/src/containers/contact.tsx index 0f6b4ca94..4c2345b7a 100644 --- a/src/containers/contact.tsx +++ b/src/containers/contact.tsx @@ -1,20 +1,20 @@ +import Link from 'next/link'; import React, { FormEvent, useEffect, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Alert from '@components/atoms/alert'; -import Heading1 from '@components/atoms/heading1'; -import Heading2 from '@components/atoms/heading2'; -import Button from '@components/molecules/button'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import Input from '@components/molecules/form/input'; -import Select from '@components/molecules/form/select'; -import Textarea from '@components/molecules/form/textarea'; -import { useLanguageId } from '@lib/useLanguageId'; -import Link from 'next/link'; +import Alert from '~components/atoms/alert'; +import Heading1 from '~components/atoms/heading1'; +import Heading2 from '~components/atoms/heading2'; +import Button from '~components/molecules/button'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import Input from '~components/molecules/form/input'; +import Select from '~components/molecules/form/select'; +import Textarea from '~components/molecules/form/textarea'; +import { useLanguageId } from '~lib/useLanguageId'; +import { PageContactRecipient } from '~src/__generated__/graphql'; -import styles from './contact.module.scss'; -import { PageContactRecipient } from '@src/__generated__/graphql'; import { useSubmitContactPageMutation } from './__generated__/contact'; +import styles from './contact.module.scss'; export type ContactProps = { type: string; diff --git a/src/containers/discover.spec.tsx b/src/containers/discover.spec.tsx index c3de3e44e..1cfb52bf1 100644 --- a/src/containers/discover.spec.tsx +++ b/src/containers/discover.spec.tsx @@ -1,13 +1,14 @@ import { waitFor } from '@testing-library/react'; import { __loadQuery } from 'next/router'; -import { buildLoader } from '@lib/test/buildLoader'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; -import Discover, { getStaticProps } from '@pages/[language]/discover'; +import { buildLoader } from '~lib/test/buildLoader'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; +import Discover, { getStaticProps } from '~pages/[language]/discover'; import { RecordingContentType, SequenceContentType, -} from '@src/__generated__/graphql'; +} from '~src/__generated__/graphql'; + import { GetDiscoverPageDataDocument, GetDiscoverPageDataQuery, diff --git a/src/containers/discover.tsx b/src/containers/discover.tsx index c99303a34..3f8edc2ea 100644 --- a/src/containers/discover.tsx +++ b/src/containers/discover.tsx @@ -1,21 +1,19 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import LineHeading from '@components/atoms/lineHeading'; -import Button from '@components/molecules/button'; -import CardCollection from '@components/molecules/card/collection'; -import CardPost from '@components/molecules/card/post'; -import CardRecording from '@components/molecules/card/recording'; -import CardSequence from '@components/molecules/card/sequence'; -import CardGroup from '@components/molecules/cardGroup'; - -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import LineHeading from '~components/atoms/lineHeading'; +import Button from '~components/molecules/button'; +import CardCollection from '~components/molecules/card/collection'; +import CardPost from '~components/molecules/card/post'; +import CardRecording from '~components/molecules/card/recording'; +import CardSequence from '~components/molecules/card/sequence'; +import CardGroup from '~components/molecules/cardGroup'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import ForwardIcon from '../../public/img/icons/icon-forward-light.svg'; - -import styles from './discover.module.scss'; import { GetDiscoverPageDataQuery } from './__generated__/discover'; +import styles from './discover.module.scss'; export type DiscoverProps = GetDiscoverPageDataQuery; diff --git a/src/containers/discover/__generated__/collections.ts b/src/containers/discover/__generated__/collections.ts index a5eccb96c..d2582caff 100644 --- a/src/containers/discover/__generated__/collections.ts +++ b/src/containers/discover/__generated__/collections.ts @@ -13,7 +13,7 @@ import { CardCollectionFragmentDoc } from '../../../components/molecules/card/__ import { CardSponsorFragmentDoc } from '../../../components/molecules/card/__generated__/sponsor'; import { CardPersonFragmentDoc } from '../../../components/molecules/card/__generated__/person'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetDiscoverCollectionsPageDataQueryVariables = Types.Exact<{ language: Types.Language; }>; @@ -115,7 +115,7 @@ export const useGetDiscoverCollectionsPageDataQuery = < graphqlFetcher(GetDiscoverCollectionsPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getDiscoverCollectionsPageData( variables: ExactAlt diff --git a/src/containers/discover/collections.tsx b/src/containers/discover/collections.tsx index 0a3b77ccf..bd9735dca 100644 --- a/src/containers/discover/collections.tsx +++ b/src/containers/discover/collections.tsx @@ -1,22 +1,20 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import LineHeading from '@components/atoms/lineHeading'; -import Button from '@components/molecules/button'; -import CardCollection from '@components/molecules/card/collection'; -import CardFavoriteEntity from '@components/molecules/card/favoriteEntity'; -import CardPerson from '@components/molecules/card/person'; -import CardSequence from '@components/molecules/card/sequence'; -import CardSponsor from '@components/molecules/card/sponsor'; -import CardGroup from '@components/molecules/cardGroup'; - -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import LineHeading from '~components/atoms/lineHeading'; +import Button from '~components/molecules/button'; +import CardCollection from '~components/molecules/card/collection'; +import CardFavoriteEntity from '~components/molecules/card/favoriteEntity'; +import CardPerson from '~components/molecules/card/person'; +import CardSequence from '~components/molecules/card/sequence'; +import CardSponsor from '~components/molecules/card/sponsor'; +import CardGroup from '~components/molecules/cardGroup'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import ForwardIcon from '../../../public/img/icons/icon-forward-light.svg'; - -import styles from './collections.module.scss'; import { GetDiscoverCollectionsPageDataQuery } from './__generated__/collections'; +import styles from './collections.module.scss'; export type IDiscoverCollectionsProps = GetDiscoverCollectionsPageDataQuery; diff --git a/src/containers/give.tsx b/src/containers/give.tsx index 42a895d47..600234ffe 100644 --- a/src/containers/give.tsx +++ b/src/containers/give.tsx @@ -1,16 +1,16 @@ +import Link from 'next/link'; import React, { SyntheticEvent } from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import Heading2 from '@components/atoms/heading2'; -import HorizontalRule from '@components/atoms/horizontalRule'; -import Button from '@components/molecules/button'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import AboutNav from '@components/organisms/aboutNav'; -import { BaseColors } from '@lib/constants'; +import Heading1 from '~components/atoms/heading1'; +import Heading2 from '~components/atoms/heading2'; +import HorizontalRule from '~components/atoms/horizontalRule'; +import Button from '~components/molecules/button'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import AboutNav from '~components/organisms/aboutNav'; +import { BaseColors } from '~lib/constants'; import styles from './give.module.scss'; -import Link from 'next/link'; export default function Blog(): JSX.Element { return ( diff --git a/src/containers/home.spec.tsx b/src/containers/home.spec.tsx index 2f74bcdda..1d2480e79 100644 --- a/src/containers/home.spec.tsx +++ b/src/containers/home.spec.tsx @@ -1,14 +1,15 @@ import { waitFor } from '@testing-library/react'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildLoader } from '@lib/test/buildLoader'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; -import Home, { getStaticPaths, getStaticProps } from '@pages/[language]'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildLoader } from '~lib/test/buildLoader'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; +import Home, { getStaticPaths, getStaticProps } from '~pages/[language]'; import { RecordingContentType, SequenceContentType, -} from '@src/__generated__/graphql'; +} from '~src/__generated__/graphql'; + import { GetHomeStaticPropsDocument, GetHomeStaticPropsQuery, diff --git a/src/containers/home.tsx b/src/containers/home.tsx index 12226421f..d817808aa 100644 --- a/src/containers/home.tsx +++ b/src/containers/home.tsx @@ -4,31 +4,28 @@ import Link from 'next/link'; import React, { useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; - -import Button from '@components/molecules/button'; -import CardPost from '@components/molecules/card/post'; -import CardRecording from '@components/molecules/card/recording'; -import CardSequence from '@components/molecules/card/sequence'; -import CardMasonry from '@components/molecules/cardMasonry'; -import DownloadAppButton from '@components/molecules/downloadAppButton'; -import Input from '@components/molecules/form/input'; -import Section from '@components/organisms/section'; -import Slider from '@components/organisms/slider'; -import Testimonies from '@components/organisms/testimonies'; -import { BaseColors } from '@lib/constants'; -import { getSessionToken } from '@lib/cookies'; - -import { getAppFeatures } from '@lib/getAppFeatures'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading1 from '~components/atoms/heading1'; +import Button from '~components/molecules/button'; +import CardPost from '~components/molecules/card/post'; +import CardRecording from '~components/molecules/card/recording'; +import CardSequence from '~components/molecules/card/sequence'; +import CardMasonry from '~components/molecules/cardMasonry'; +import DownloadAppButton from '~components/molecules/downloadAppButton'; +import Input from '~components/molecules/form/input'; +import Section from '~components/organisms/section'; +import Slider from '~components/organisms/slider'; +import Testimonies from '~components/organisms/testimonies'; +import { BaseColors } from '~lib/constants'; +import { getSessionToken } from '~lib/cookies'; +import { getAppFeatures } from '~lib/getAppFeatures'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import IconBell from '../../public/img/icons/fa-bell.svg'; import IconForward from '../../public/img/icons/icon-forward-light.svg'; import ImagePlayers from '../../public/img/players.jpeg'; - -import styles from './home.module.scss'; import { GetHomeStaticPropsQuery } from './__generated__/home'; +import styles from './home.module.scss'; export type HomeProps = { data: GetHomeStaticPropsQuery | undefined; diff --git a/src/containers/library/__generated__/history.ts b/src/containers/library/__generated__/history.ts index 544d9451e..7cdc13cbb 100644 --- a/src/containers/library/__generated__/history.ts +++ b/src/containers/library/__generated__/history.ts @@ -7,7 +7,7 @@ import { CardHatSponsorFragmentDoc } from '../../../components/molecules/card/ha import { TeaseRecordingFragmentDoc } from '../../../components/molecules/__generated__/teaseRecording'; import { AndMiniplayerFragmentDoc } from '../../../components/templates/__generated__/andMiniplayer'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetLibraryHistoryPageDataQueryVariables = Types.Exact<{ language: Types.Language; first: Types.Scalars['Int']; @@ -61,7 +61,7 @@ export const useGetLibraryHistoryPageDataQuery = < graphqlFetcher(GetLibraryHistoryPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getLibraryHistoryPageData( variables: ExactAlt diff --git a/src/containers/library/__generated__/library.ts b/src/containers/library/__generated__/library.ts index 3fd37b8ec..bcc946a9c 100644 --- a/src/containers/library/__generated__/library.ts +++ b/src/containers/library/__generated__/library.ts @@ -14,7 +14,7 @@ import { CardCollectionFragmentDoc } from '../../../components/molecules/card/__ import { CardSponsorFragmentDoc } from '../../../components/molecules/card/__generated__/sponsor'; import { CardPersonFragmentDoc } from '../../../components/molecules/card/__generated__/person'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetLibraryDataQueryVariables = Types.Exact<{ language: Types.Language; first: Types.Scalars['Int']; @@ -84,7 +84,7 @@ export const useGetLibraryDataQuery = < graphqlFetcher(GetLibraryDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getLibraryData( variables: ExactAlt diff --git a/src/containers/library/history.tsx b/src/containers/library/history.tsx index 9c48dcf14..f7f81a601 100644 --- a/src/containers/library/history.tsx +++ b/src/containers/library/history.tsx @@ -2,24 +2,24 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; import { useInfiniteQuery } from 'react-query'; -import withAuthGuard from '@components/HOCs/withAuthGuard'; -import Button from '@components/molecules/button'; -import CardRecording from '@components/molecules/card/recording'; -import CardGroup from '@components/molecules/cardGroup'; -import LoadingCards from '@components/molecules/loadingCards'; -import EmptyState from '@components/organisms/emptyState'; -import LibraryNav from '@components/organisms/libraryNav'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import withAuthGuard from '~components/HOCs/withAuthGuard'; +import Button from '~components/molecules/button'; +import CardRecording from '~components/molecules/card/recording'; +import CardGroup from '~components/molecules/cardGroup'; +import LoadingCards from '~components/molecules/loadingCards'; +import EmptyState from '~components/organisms/emptyState'; +import LibraryNav from '~components/organisms/libraryNav'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; +import { Language } from '~src/__generated__/graphql'; -import baseStyles from './base.module.scss'; -import styles from './history.module.scss'; -import LibraryLoggedOut from './loggedOut'; -import { Language } from '@src/__generated__/graphql'; import { GetLibraryHistoryPageDataDocument, GetLibraryHistoryPageDataQuery, GetLibraryHistoryPageDataQueryVariables, } from './__generated__/history'; +import baseStyles from './base.module.scss'; +import styles from './history.module.scss'; +import LibraryLoggedOut from './loggedOut'; export const getLibraryHistoryPageDataDefaultVariables = ( language: Language diff --git a/src/containers/library/library.tsx b/src/containers/library/library.tsx index cda353178..da5eac89a 100644 --- a/src/containers/library/library.tsx +++ b/src/containers/library/library.tsx @@ -2,15 +2,12 @@ import { useRouter } from 'next/router'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import withAuthGuard from '@components/HOCs/withAuthGuard'; -import CardFavorite from '@components/molecules/card/favorite'; -import CardMasonry from '@components/molecules/cardMasonry'; -import LoadingCards from '@components/molecules/loadingCards'; -import EmptyState from '@components/organisms/emptyState'; -import LibraryNav from '@components/organisms/libraryNav'; - -import baseStyles from './base.module.scss'; -import LibraryLoggedOut from './loggedOut'; +import withAuthGuard from '~components/HOCs/withAuthGuard'; +import CardFavorite from '~components/molecules/card/favorite'; +import CardMasonry from '~components/molecules/cardMasonry'; +import LoadingCards from '~components/molecules/loadingCards'; +import EmptyState from '~components/organisms/emptyState'; +import LibraryNav from '~components/organisms/libraryNav'; import { FavoritableCatalogEntityType, FavoritesSortableField, @@ -18,11 +15,14 @@ import { OrderByDirection, RecordingContentType, RecordingViewerPlaybackStatus, -} from '@src/__generated__/graphql'; +} from '~src/__generated__/graphql'; + import { GetLibraryDataQueryVariables, useGetLibraryDataQuery, } from './__generated__/library'; +import baseStyles from './base.module.scss'; +import LibraryLoggedOut from './loggedOut'; export const SORT_MAP = { new: [FavoritesSortableField.FavoritedAt, OrderByDirection.Desc], diff --git a/src/containers/library/loggedOut.tsx b/src/containers/library/loggedOut.tsx index cafa62ed3..b495dc9b6 100644 --- a/src/containers/library/loggedOut.tsx +++ b/src/containers/library/loggedOut.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Alert from '@components/atoms/alert'; -import Heading2 from '@components/atoms/heading2'; -import Button from '@components/molecules/button'; -import LibraryNav from '@components/organisms/libraryNav'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Alert from '~components/atoms/alert'; +import Heading2 from '~components/atoms/heading2'; +import Button from '~components/molecules/button'; +import LibraryNav from '~components/organisms/libraryNav'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import baseStyles from './base.module.scss'; import styles from './loggedOut.module.scss'; diff --git a/src/containers/library/playlist/__generated__/detail.ts b/src/containers/library/playlist/__generated__/detail.ts index e9d9f70f4..920cdb663 100644 --- a/src/containers/library/playlist/__generated__/detail.ts +++ b/src/containers/library/playlist/__generated__/detail.ts @@ -7,7 +7,7 @@ import { CardHatSponsorFragmentDoc } from '../../../../components/molecules/card import { TeaseRecordingFragmentDoc } from '../../../../components/molecules/__generated__/teaseRecording'; import { AndMiniplayerFragmentDoc } from '../../../../components/templates/__generated__/andMiniplayer'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetLibraryPlaylistPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -54,7 +54,7 @@ export const useGetLibraryPlaylistPageDataQuery = < graphqlFetcher(GetLibraryPlaylistPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getLibraryPlaylistPageData( variables: ExactAlt diff --git a/src/containers/library/playlist/__generated__/list.ts b/src/containers/library/playlist/__generated__/list.ts index 38936aae0..735371b04 100644 --- a/src/containers/library/playlist/__generated__/list.ts +++ b/src/containers/library/playlist/__generated__/list.ts @@ -5,7 +5,7 @@ import { TeaseRecordingFragmentDoc } from '../../../../components/molecules/__ge import { AndMiniplayerFragmentDoc } from '../../../../components/templates/__generated__/andMiniplayer'; import { PersonLockupFragmentDoc } from '../../../../components/molecules/__generated__/personLockup'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetLibraryPlaylistsDataQueryVariables = Types.Exact<{ language: Types.Language; offset: Types.InputMaybe; @@ -52,7 +52,7 @@ export const useGetLibraryPlaylistsDataQuery = < graphqlFetcher(GetLibraryPlaylistsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getLibraryPlaylistsData( variables: ExactAlt diff --git a/src/containers/library/playlist/detail.tsx b/src/containers/library/playlist/detail.tsx index d36aa1d89..924da61f0 100644 --- a/src/containers/library/playlist/detail.tsx +++ b/src/containers/library/playlist/detail.tsx @@ -1,27 +1,26 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import HorizontalRule from '@components/atoms/horizontalRule'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardPlaylistItem from '@components/molecules/card/playlistItem'; -import CardGroup from '@components/molecules/cardGroup'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import HorizontalRule from '~components/atoms/horizontalRule'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardPlaylistItem from '~components/molecules/card/playlistItem'; +import CardGroup from '~components/molecules/cardGroup'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; import DefinitionList, { IDefinitionListTerm, -} from '@components/molecules/definitionList'; -import IconButton from '@components/molecules/iconButton'; -import Tease from '@components/molecules/tease'; -import TypeLockup from '@components/molecules/typeLockup'; -import { BaseColors } from '@lib/constants'; -import { formatLongDateTime } from '@lib/date'; +} from '~components/molecules/definitionList'; +import IconButton from '~components/molecules/iconButton'; +import Tease from '~components/molecules/tease'; +import TypeLockup from '~components/molecules/typeLockup'; +import { BaseColors } from '~lib/constants'; +import { formatLongDateTime } from '~lib/date'; import ListIcon from '../../../../public/img/icons/fa-list.svg'; import LikeActiveIcon from '../../../../public/img/icons/icon-like-active.svg'; - -import styles from './detail.module.scss'; import { GetLibraryPlaylistPageDataQuery } from './__generated__/detail'; +import styles from './detail.module.scss'; export type ILibraryPlaylistDetailProps = { playlist: NonNullable< diff --git a/src/containers/library/playlist/list.tsx b/src/containers/library/playlist/list.tsx index 06d710276..b6d215875 100644 --- a/src/containers/library/playlist/list.tsx +++ b/src/containers/library/playlist/list.tsx @@ -2,20 +2,19 @@ import clsx from 'clsx'; import React, { useState } from 'react'; import { FormattedMessage } from 'react-intl'; -import InfoBox from '@components/atoms/infoBox'; -import withAuthGuard from '@components/HOCs/withAuthGuard'; -import CardPlaylist from '@components/molecules/card/playlist'; -import CardMasonry from '@components/molecules/cardMasonry'; -import LoadingCards from '@components/molecules/loadingCards'; -import EmptyState from '@components/organisms/emptyState'; -import LibraryNav from '@components/organisms/libraryNav'; +import InfoBox from '~components/atoms/infoBox'; +import withAuthGuard from '~components/HOCs/withAuthGuard'; +import CardPlaylist from '~components/molecules/card/playlist'; +import CardMasonry from '~components/molecules/cardMasonry'; +import LoadingCards from '~components/molecules/loadingCards'; +import EmptyState from '~components/organisms/emptyState'; +import LibraryNav from '~components/organisms/libraryNav'; +import { Language } from '~src/__generated__/graphql'; import baseStyles from '../base.module.scss'; import LibraryLoggedOut from '../loggedOut'; - -import styles from './list.module.scss'; import { useGetLibraryPlaylistsDataQuery } from './__generated__/list'; -import { Language } from '@src/__generated__/graphql'; +import styles from './list.module.scss'; export type ILibraryPlaylistsProps = { language: Language; diff --git a/src/containers/page/__generated__/detail.ts b/src/containers/page/__generated__/detail.ts index 8226863bc..a92eabd3e 100644 --- a/src/containers/page/__generated__/detail.ts +++ b/src/containers/page/__generated__/detail.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetCustomDetailPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -63,7 +63,7 @@ export const useGetCustomDetailPageStaticPathsQuery = < graphqlFetcher(GetCustomDetailPageStaticPathsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getCustomDetailPageData( variables: ExactAlt diff --git a/src/containers/page/detail.spec.ts b/src/containers/page/detail.spec.ts index b10535e15..17cbd4fbf 100644 --- a/src/containers/page/detail.spec.ts +++ b/src/containers/page/detail.spec.ts @@ -1,11 +1,13 @@ -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { screen } from '@testing-library/react'; +import { __loadQuery } from 'next/router'; + +import { buildLoader } from '~lib/test/buildLoader'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import CustomPageDetail, { getStaticPaths, getStaticProps, -} from '@pages/[language]/page/[id]/[[...slugs]]'; -import { buildLoader } from '@lib/test/buildLoader'; -import { screen } from '@testing-library/react'; -import { __loadQuery } from 'next/router'; +} from '~pages/[language]/page/[id]/[[...slugs]]'; + import { GetCustomDetailPageDataDocument, GetCustomDetailPageStaticPathsDocument, diff --git a/src/containers/page/detail.tsx b/src/containers/page/detail.tsx index b4181e4bc..077e9737c 100644 --- a/src/containers/page/detail.tsx +++ b/src/containers/page/detail.tsx @@ -1,8 +1,9 @@ import React from 'react'; -import withFailStates from '@components/HOCs/withFailStates'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import Heading1 from '@components/atoms/heading1'; +import Heading1 from '~components/atoms/heading1'; +import withFailStates from '~components/HOCs/withFailStates'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; + import { GetCustomDetailPageDataQuery } from './__generated__/detail'; export type CustomPageDetailProps = GetCustomDetailPageDataQuery; diff --git a/src/containers/presenter/__generated__/appears.ts b/src/containers/presenter/__generated__/appears.ts index dfafde89b..15c2cab32 100644 --- a/src/containers/presenter/__generated__/appears.ts +++ b/src/containers/presenter/__generated__/appears.ts @@ -3,7 +3,7 @@ import * as Types from '../../../__generated__/graphql'; import { PresenterPivotFragmentDoc } from './pivot'; import { CardCollectionFragmentDoc } from '../../../components/molecules/card/__generated__/collection'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetPresenterAppearsPageDataQueryVariables = Types.Exact<{ language: Types.Language; id: Types.Scalars['ID']; @@ -50,7 +50,7 @@ export const useGetPresenterAppearsPageDataQuery = < graphqlFetcher(GetPresenterAppearsPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getPresenterAppearsPageData( variables: ExactAlt diff --git a/src/containers/presenter/__generated__/detail.ts b/src/containers/presenter/__generated__/detail.ts index f65b47a8d..2cd02e69f 100644 --- a/src/containers/presenter/__generated__/detail.ts +++ b/src/containers/presenter/__generated__/detail.ts @@ -9,7 +9,7 @@ import { AndMiniplayerFragmentDoc } from '../../../components/templates/__genera import { CardSequenceFragmentDoc } from '../../../components/molecules/card/__generated__/sequence'; import { CardCollectionFragmentDoc } from '../../../components/molecules/card/__generated__/collection'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetPresenterDetailPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; language: Types.Language; @@ -169,7 +169,7 @@ export const useGetPresenterDetailPathsDataQuery = < graphqlFetcher(GetPresenterDetailPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getPresenterDetailPageData( variables: ExactAlt diff --git a/src/containers/presenter/__generated__/recordings.ts b/src/containers/presenter/__generated__/recordings.ts index c8cdeaf32..5f1e251db 100644 --- a/src/containers/presenter/__generated__/recordings.ts +++ b/src/containers/presenter/__generated__/recordings.ts @@ -9,7 +9,7 @@ import { TeaseRecordingFragmentDoc } from '../../../components/molecules/__gener import { AndMiniplayerFragmentDoc } from '../../../components/templates/__generated__/andMiniplayer'; import { GenerateFeedFragmentDoc } from '../../../lib/__generated__/generateFeed'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetPresenterRecordingsPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; offset: Types.InputMaybe; @@ -95,7 +95,7 @@ export const useGetPresenterRecordingsFeedDataQuery = < graphqlFetcher(GetPresenterRecordingsFeedDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getPresenterRecordingsPageData( variables: ExactAlt diff --git a/src/containers/presenter/__generated__/sequences.ts b/src/containers/presenter/__generated__/sequences.ts index c20700822..facd0c6a7 100644 --- a/src/containers/presenter/__generated__/sequences.ts +++ b/src/containers/presenter/__generated__/sequences.ts @@ -4,7 +4,7 @@ import { PresenterPivotFragmentDoc } from './pivot'; import { CardSequenceFragmentDoc } from '../../../components/molecules/card/__generated__/sequence'; import { PersonLockupFragmentDoc } from '../../../components/molecules/__generated__/personLockup'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetPresenterSequencesPageDataQueryVariables = Types.Exact<{ language: Types.Language; id: Types.Scalars['ID']; @@ -52,7 +52,7 @@ export const useGetPresenterSequencesPageDataQuery = < graphqlFetcher(GetPresenterSequencesPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getPresenterSequencesPageData( variables: ExactAlt diff --git a/src/containers/presenter/__generated__/top.ts b/src/containers/presenter/__generated__/top.ts index 46ca3bfd3..e1fc34e20 100644 --- a/src/containers/presenter/__generated__/top.ts +++ b/src/containers/presenter/__generated__/top.ts @@ -8,7 +8,7 @@ import { CardHatSponsorFragmentDoc } from '../../../components/molecules/card/ha import { TeaseRecordingFragmentDoc } from '../../../components/molecules/__generated__/teaseRecording'; import { AndMiniplayerFragmentDoc } from '../../../components/templates/__generated__/andMiniplayer'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetPresenterTopPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; offset: Types.InputMaybe; @@ -58,7 +58,7 @@ export const useGetPresenterTopPageDataQuery = < graphqlFetcher(GetPresenterTopPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getPresenterTopPageData( variables: ExactAlt diff --git a/src/containers/presenter/appears.tsx b/src/containers/presenter/appears.tsx index 168f0197b..0f70f6039 100644 --- a/src/containers/presenter/appears.tsx +++ b/src/containers/presenter/appears.tsx @@ -1,18 +1,18 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import LineHeading from '@components/atoms/lineHeading'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardCollection from '@components/molecules/card/collection'; -import CardGroup from '@components/molecules/cardGroup'; -import Pagination from '@components/molecules/pagination'; -import { BaseColors } from '@lib/constants'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; +import LineHeading from '~components/atoms/lineHeading'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardCollection from '~components/molecules/card/collection'; +import CardGroup from '~components/molecules/cardGroup'; +import Pagination from '~components/molecules/pagination'; +import { BaseColors } from '~lib/constants'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; -import PresenterPivot from './pivot'; import { GetPresenterAppearsPageDataQuery } from './__generated__/appears'; import { PresenterPivotFragment } from './__generated__/pivot'; +import PresenterPivot from './pivot'; export type PresenterAppearsProps = PaginatedProps< NonNullable< diff --git a/src/containers/presenter/detail.tsx b/src/containers/presenter/detail.tsx index 1c0ba01ca..a24af9159 100644 --- a/src/containers/presenter/detail.tsx +++ b/src/containers/presenter/detail.tsx @@ -2,35 +2,33 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import HorizontalRule from '@components/atoms/horizontalRule'; -import LineHeading from '@components/atoms/lineHeading'; -import RoundImage from '@components/atoms/roundImage'; -import withFailStates from '@components/HOCs/withFailStates'; -import Button from '@components/molecules/button'; -import ButtonFavorite from '@components/molecules/buttonFavorite'; -import ButtonShare from '@components/molecules/buttonShare'; -import CardCollection from '@components/molecules/card/collection'; -import CardRecording from '@components/molecules/card/recording'; -import CardSequence from '@components/molecules/card/sequence'; -import CardGroup from '@components/molecules/cardGroup'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import HorizontalRule from '~components/atoms/horizontalRule'; +import LineHeading from '~components/atoms/lineHeading'; +import RoundImage from '~components/atoms/roundImage'; +import withFailStates from '~components/HOCs/withFailStates'; +import Button from '~components/molecules/button'; +import ButtonFavorite from '~components/molecules/buttonFavorite'; +import ButtonShare from '~components/molecules/buttonShare'; +import CardCollection from '~components/molecules/card/collection'; +import CardRecording from '~components/molecules/card/recording'; +import CardSequence from '~components/molecules/card/sequence'; +import CardGroup from '~components/molecules/cardGroup'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; import DefinitionList, { IDefinitionListTerm, -} from '@components/molecules/definitionList'; -import PersonTypeLockup from '@components/molecules/personTypeLockup'; -import Tease from '@components/molecules/tease'; -import { useIsPersonFavorited } from '@lib/api/useIsPersonFavorited'; -import { BaseColors } from '@lib/constants'; - -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +} from '~components/molecules/definitionList'; +import PersonTypeLockup from '~components/molecules/personTypeLockup'; +import Tease from '~components/molecules/tease'; +import { useIsPersonFavorited } from '~lib/api/useIsPersonFavorited'; +import { BaseColors } from '~lib/constants'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import ForwardIcon from '../../../public/img/icons/icon-forward-light.svg'; - -import styles from './detail.module.scss'; import { GetPresenterDetailPageDataQuery } from './__generated__/detail'; +import styles from './detail.module.scss'; export type PresenterDetailProps = GetPresenterDetailPageDataQuery; diff --git a/src/containers/presenter/list/__generated__/all.ts b/src/containers/presenter/list/__generated__/all.ts index 3c4b07859..645126cf2 100644 --- a/src/containers/presenter/list/__generated__/all.ts +++ b/src/containers/presenter/list/__generated__/all.ts @@ -1,7 +1,7 @@ import * as Types from '../../../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetPresenterListAllPageDataQueryVariables = Types.Exact<{ language: Types.Language; after: Types.InputMaybe; @@ -51,7 +51,7 @@ export const useGetPresenterListAllPageDataQuery = < graphqlFetcher(GetPresenterListAllPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getPresenterListAllPageData( variables: ExactAlt diff --git a/src/containers/presenter/list/__generated__/letter.ts b/src/containers/presenter/list/__generated__/letter.ts index dfef181fa..52b1b4743 100644 --- a/src/containers/presenter/list/__generated__/letter.ts +++ b/src/containers/presenter/list/__generated__/letter.ts @@ -2,7 +2,7 @@ import * as Types from '../../../../__generated__/graphql'; import { PresenterListEntryFragmentDoc } from './list'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetPresenterListLetterPageDataQueryVariables = Types.Exact<{ language: Types.Language; startsWith: Types.InputMaybe; @@ -42,7 +42,7 @@ export const useGetPresenterListLetterPageDataQuery = < graphqlFetcher(GetPresenterListLetterPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getPresenterListLetterPageData( variables: ExactAlt diff --git a/src/containers/presenter/list/__generated__/list.ts b/src/containers/presenter/list/__generated__/list.ts index 69434f60f..d6ff4cfaf 100644 --- a/src/containers/presenter/list/__generated__/list.ts +++ b/src/containers/presenter/list/__generated__/list.ts @@ -1,7 +1,7 @@ import * as Types from '../../../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type PresenterListEntryFragment = { __typename?: 'Person', canonicalPath: string, givenName: string, surname: string, summary: string, image: { __typename?: 'Image', url: string } | null }; export type GetPersonListLetterCountsQueryVariables = Types.Exact<{ @@ -42,7 +42,7 @@ export const useGetPersonListLetterCountsQuery = < graphqlFetcher(GetPersonListLetterCountsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getPersonListLetterCounts( variables: ExactAlt diff --git a/src/containers/presenter/list/all.spec.tsx b/src/containers/presenter/list/all.spec.tsx index fe246b2ff..bd810a35a 100644 --- a/src/containers/presenter/list/all.spec.tsx +++ b/src/containers/presenter/list/all.spec.tsx @@ -1,10 +1,12 @@ -import { buildLoader } from '@lib/test/buildLoader'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { screen } from '@testing-library/react'; + +import { buildLoader } from '~lib/test/buildLoader'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import All, { getStaticPaths, getStaticProps, -} from '@pages/[language]/presenters/all'; -import { screen } from '@testing-library/react'; +} from '~pages/[language]/presenters/all'; + import { GetPresenterListAllPageDataDocument } from './__generated__/all'; import { GetPersonListLetterCountsDocument } from './__generated__/list'; diff --git a/src/containers/presenter/list/all.tsx b/src/containers/presenter/list/all.tsx index 5b652ded7..4fbd00a0e 100644 --- a/src/containers/presenter/list/all.tsx +++ b/src/containers/presenter/list/all.tsx @@ -1,15 +1,17 @@ -import List, { PresentersProps } from './list'; import React, { useEffect, useRef } from 'react'; -import { useInfiniteQuery } from 'react-query'; -import useOnScreen from '@lib/hooks/useOnScreen'; -import { fetchApi } from '@lib/api/fetchApi'; -import { useLanguageId } from '@lib/useLanguageId'; import { useIntl } from 'react-intl'; +import { useInfiniteQuery } from 'react-query'; + +import { fetchApi } from '~lib/api/fetchApi'; +import useOnScreen from '~lib/hooks/useOnScreen'; +import { useLanguageId } from '~lib/useLanguageId'; +import { Maybe } from '~src/__generated__/graphql'; + import { GetPresenterListAllPageDataDocument, GetPresenterListAllPageDataQuery, } from './__generated__/all'; -import { Maybe } from '@src/__generated__/graphql'; +import List, { PresentersProps } from './list'; export default function All(props: PresentersProps) { const endRef = useRef(null); diff --git a/src/containers/presenter/list/letter.spec.tsx b/src/containers/presenter/list/letter.spec.tsx index eb1701049..ce0d614dd 100644 --- a/src/containers/presenter/list/letter.spec.tsx +++ b/src/containers/presenter/list/letter.spec.tsx @@ -1,13 +1,14 @@ +import { screen } from '@testing-library/react'; import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import Presenters, { getStaticPaths, getStaticProps, -} from '@pages/[language]/presenters/letter/[letter]'; -import { screen } from '@testing-library/react'; +} from '~pages/[language]/presenters/letter/[letter]'; + import { GetPresenterListLetterPageDataDocument } from './__generated__/letter'; import { GetPersonListLetterCountsDocument } from './__generated__/list'; diff --git a/src/containers/presenter/list/letter.tsx b/src/containers/presenter/list/letter.tsx index c84737350..dc5c11cf1 100644 --- a/src/containers/presenter/list/letter.tsx +++ b/src/containers/presenter/list/letter.tsx @@ -1,7 +1,9 @@ -import withFailStates from '@components/HOCs/withFailStates'; -import Presenters, { PresentersProps } from './list'; import React from 'react'; +import withFailStates from '~components/HOCs/withFailStates'; + +import Presenters, { PresentersProps } from './list'; + export type { PresentersProps } from './list'; function Letter(props: PresentersProps) { diff --git a/src/containers/presenter/list/list.tsx b/src/containers/presenter/list/list.tsx index f6e99085f..0e591f5ea 100644 --- a/src/containers/presenter/list/list.tsx +++ b/src/containers/presenter/list/list.tsx @@ -2,20 +2,20 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import Heading2 from '@components/atoms/heading2'; -import RoundImage from '@components/atoms/roundImage'; -import ButtonBack from '@components/molecules/buttonBack'; -import Card from '@components/molecules/card'; -import JumpBar from '@components/molecules/jumpBar'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading1 from '~components/atoms/heading1'; +import Heading2 from '~components/atoms/heading2'; +import RoundImage from '~components/atoms/roundImage'; +import ButtonBack from '~components/molecules/buttonBack'; +import Card from '~components/molecules/card'; +import JumpBar from '~components/molecules/jumpBar'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import styles from './list.module.scss'; import { GetPersonListLetterCountsQuery, PresenterListEntryFragment, } from './__generated__/list'; +import styles from './list.module.scss'; export type PresentersProps = { persons: PresenterListEntryFragment[]; diff --git a/src/containers/presenter/pivot.tsx b/src/containers/presenter/pivot.tsx index db87d6297..54f47fedc 100644 --- a/src/containers/presenter/pivot.tsx +++ b/src/containers/presenter/pivot.tsx @@ -1,14 +1,14 @@ import React, { PropsWithChildren } from 'react'; -import Heading2 from '@components/atoms/heading2'; -import RoundImage from '@components/atoms/roundImage'; -import ButtonBack from '@components/molecules/buttonBack'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import PersonTypeLockup from '@components/molecules/personTypeLockup'; -import Tease from '@components/molecules/tease'; +import Heading2 from '~components/atoms/heading2'; +import RoundImage from '~components/atoms/roundImage'; +import ButtonBack from '~components/molecules/buttonBack'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import PersonTypeLockup from '~components/molecules/personTypeLockup'; +import Tease from '~components/molecules/tease'; -import styles from './pivot.module.scss'; import { PresenterPivotFragment } from './__generated__/pivot'; +import styles from './pivot.module.scss'; type Props = { person: PresenterPivotFragment; diff --git a/src/containers/presenter/recordings.spec.tsx b/src/containers/presenter/recordings.spec.tsx index d708bf7ca..6ae3bf642 100644 --- a/src/containers/presenter/recordings.spec.tsx +++ b/src/containers/presenter/recordings.spec.tsx @@ -1,15 +1,16 @@ import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import PresenterRecordings, { getStaticPaths, getStaticProps, -} from '@pages/[language]/presenters/[id]/teachings/page/[i]'; -import { GetPresenterRecordingsPageDataDocument } from './__generated__/recordings'; +} from '~pages/[language]/presenters/[id]/teachings/page/[i]'; +import { RecordingContentType } from '~src/__generated__/graphql'; + import { GetPresenterDetailPathsDataDocument } from './__generated__/detail'; -import { RecordingContentType } from '@src/__generated__/graphql'; +import { GetPresenterRecordingsPageDataDocument } from './__generated__/recordings'; const renderPage = buildStaticRenderer(PresenterRecordings, getStaticProps); diff --git a/src/containers/presenter/recordings.tsx b/src/containers/presenter/recordings.tsx index bcdd1c3d1..6a4c05198 100644 --- a/src/containers/presenter/recordings.tsx +++ b/src/containers/presenter/recordings.tsx @@ -1,20 +1,20 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import LineHeading from '@components/atoms/lineHeading'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardRecording from '@components/molecules/card/recording'; -import CardGroup from '@components/molecules/cardGroup'; -import Pagination from '@components/molecules/pagination'; -import RssAlternate from '@components/molecules/rssAlternate'; -import { BaseColors } from '@lib/constants'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import LineHeading from '~components/atoms/lineHeading'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardRecording from '~components/molecules/card/recording'; +import CardGroup from '~components/molecules/cardGroup'; +import Pagination from '~components/molecules/pagination'; +import RssAlternate from '~components/molecules/rssAlternate'; +import { BaseColors } from '~lib/constants'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import PresenterPivot from './pivot'; -import { GetPresenterRecordingsPageDataQuery } from './__generated__/recordings'; import { PresenterPivotFragment } from './__generated__/pivot'; +import { GetPresenterRecordingsPageDataQuery } from './__generated__/recordings'; +import PresenterPivot from './pivot'; export type PresenterRecordingsProps = PaginatedProps< NonNullable< diff --git a/src/containers/presenter/sequences.tsx b/src/containers/presenter/sequences.tsx index 2355bcf32..b35da6579 100644 --- a/src/containers/presenter/sequences.tsx +++ b/src/containers/presenter/sequences.tsx @@ -1,18 +1,18 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import LineHeading from '@components/atoms/lineHeading'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardSequence from '@components/molecules/card/sequence'; -import CardGroup from '@components/molecules/cardGroup'; -import Pagination from '@components/molecules/pagination'; -import { BaseColors } from '@lib/constants'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; +import LineHeading from '~components/atoms/lineHeading'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardSequence from '~components/molecules/card/sequence'; +import CardGroup from '~components/molecules/cardGroup'; +import Pagination from '~components/molecules/pagination'; +import { BaseColors } from '~lib/constants'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; -import PresenterPivot from './pivot'; -import { GetPresenterSequencesPageDataQuery } from './__generated__/sequences'; import { PresenterPivotFragment } from './__generated__/pivot'; +import { GetPresenterSequencesPageDataQuery } from './__generated__/sequences'; +import PresenterPivot from './pivot'; export type PresenterSequencesProps = PaginatedProps< NonNullable< diff --git a/src/containers/presenter/top.tsx b/src/containers/presenter/top.tsx index d86a47b24..695740b1c 100644 --- a/src/containers/presenter/top.tsx +++ b/src/containers/presenter/top.tsx @@ -1,15 +1,15 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import LineHeading from '@components/atoms/lineHeading'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardRecording from '@components/molecules/card/recording'; -import CardGroup from '@components/molecules/cardGroup'; -import { BaseColors } from '@lib/constants'; +import LineHeading from '~components/atoms/lineHeading'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardRecording from '~components/molecules/card/recording'; +import CardGroup from '~components/molecules/cardGroup'; +import { BaseColors } from '~lib/constants'; -import PresenterPivot from './pivot'; import { PresenterPivotFragment } from './__generated__/pivot'; import { GetPresenterTopPageDataQuery } from './__generated__/top'; +import PresenterPivot from './pivot'; export type PresenterTopProps = GetPresenterTopPageDataQuery; diff --git a/src/containers/release/__generated__/detail.ts b/src/containers/release/__generated__/detail.ts index 1ae83b76b..a72385152 100644 --- a/src/containers/release/__generated__/detail.ts +++ b/src/containers/release/__generated__/detail.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, useMutation, UseQueryOptions, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetMediaReleaseFormsPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -93,7 +93,7 @@ export const useSubmitMediaReleaseFormMutation = < (variables?: SubmitMediaReleaseFormMutationVariables) => graphqlFetcher(SubmitMediaReleaseFormDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getMediaReleaseFormsPageData( variables: ExactAlt diff --git a/src/containers/release/detail.tsx b/src/containers/release/detail.tsx index e2b9a3203..15457dc61 100644 --- a/src/containers/release/detail.tsx +++ b/src/containers/release/detail.tsx @@ -1,20 +1,20 @@ import React, { FormEvent, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Alert from '@components/atoms/alert'; -import Heading1 from '@components/atoms/heading1'; -import Heading2 from '@components/atoms/heading2'; -import withFailStates from '@components/HOCs/withFailStates'; -import Button from '@components/molecules/button'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import Input from '@components/molecules/form/input'; -import Textarea from '@components/molecules/form/textarea'; +import Alert from '~components/atoms/alert'; +import Heading1 from '~components/atoms/heading1'; +import Heading2 from '~components/atoms/heading2'; +import withFailStates from '~components/HOCs/withFailStates'; +import Button from '~components/molecules/button'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import Input from '~components/molecules/form/input'; +import Textarea from '~components/molecules/form/textarea'; -import styles from './detail.module.scss'; import { GetMediaReleaseFormsPageDataQuery, useSubmitMediaReleaseFormMutation, } from './__generated__/detail'; +import styles from './detail.module.scss'; export type ReleaseDetailProps = GetMediaReleaseFormsPageDataQuery; diff --git a/src/containers/search/__generated__/collections.ts b/src/containers/search/__generated__/collections.ts index 4d656292c..47fd927ff 100644 --- a/src/containers/search/__generated__/collections.ts +++ b/src/containers/search/__generated__/collections.ts @@ -2,7 +2,7 @@ import * as Types from '../../../__generated__/graphql'; import { CardCollectionFragmentDoc } from '../../../components/molecules/card/__generated__/collection'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSearchResultsCollectionsQueryVariables = Types.Exact<{ language: Types.Language; term: Types.Scalars['String']; @@ -38,7 +38,7 @@ export const useGetSearchResultsCollectionsQuery = < graphqlFetcher(GetSearchResultsCollectionsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSearchResultsCollections( variables: ExactAlt diff --git a/src/containers/search/__generated__/persons.ts b/src/containers/search/__generated__/persons.ts index d384cb220..4397727b2 100644 --- a/src/containers/search/__generated__/persons.ts +++ b/src/containers/search/__generated__/persons.ts @@ -2,7 +2,7 @@ import * as Types from '../../../__generated__/graphql'; import { CardPersonFragmentDoc } from '../../../components/molecules/card/__generated__/person'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSearchResultsPersonsQueryVariables = Types.Exact<{ language: Types.Language; term: Types.Scalars['String']; @@ -38,7 +38,7 @@ export const useGetSearchResultsPersonsQuery = < graphqlFetcher(GetSearchResultsPersonsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSearchResultsPersons( variables: ExactAlt diff --git a/src/containers/search/__generated__/sequences.ts b/src/containers/search/__generated__/sequences.ts index 5363fd5ec..c34902192 100644 --- a/src/containers/search/__generated__/sequences.ts +++ b/src/containers/search/__generated__/sequences.ts @@ -3,7 +3,7 @@ import * as Types from '../../../__generated__/graphql'; import { CardSequenceFragmentDoc } from '../../../components/molecules/card/__generated__/sequence'; import { PersonLockupFragmentDoc } from '../../../components/molecules/__generated__/personLockup'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSearchResultsSequencesQueryVariables = Types.Exact<{ language: Types.Language; term: Types.Scalars['String']; @@ -40,7 +40,7 @@ export const useGetSearchResultsSequencesQuery = < graphqlFetcher(GetSearchResultsSequencesDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSearchResultsSequences( variables: ExactAlt diff --git a/src/containers/search/__generated__/sponsors.ts b/src/containers/search/__generated__/sponsors.ts index 7fe06a538..82786dcc0 100644 --- a/src/containers/search/__generated__/sponsors.ts +++ b/src/containers/search/__generated__/sponsors.ts @@ -2,7 +2,7 @@ import * as Types from '../../../__generated__/graphql'; import { CardSponsorFragmentDoc } from '../../../components/molecules/card/__generated__/sponsor'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSearchResultsSponsorsQueryVariables = Types.Exact<{ language: Types.Language; term: Types.Scalars['String']; @@ -38,7 +38,7 @@ export const useGetSearchResultsSponsorsQuery = < graphqlFetcher(GetSearchResultsSponsorsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSearchResultsSponsors( variables: ExactAlt diff --git a/src/containers/search/__generated__/teachings.ts b/src/containers/search/__generated__/teachings.ts index eb94e07d5..b91be4ee8 100644 --- a/src/containers/search/__generated__/teachings.ts +++ b/src/containers/search/__generated__/teachings.ts @@ -7,7 +7,7 @@ import { CardHatSponsorFragmentDoc } from '../../../components/molecules/card/ha import { TeaseRecordingFragmentDoc } from '../../../components/molecules/__generated__/teaseRecording'; import { AndMiniplayerFragmentDoc } from '../../../components/templates/__generated__/andMiniplayer'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSearchResultsRecordingsQueryVariables = Types.Exact<{ language: Types.Language; term: Types.Scalars['String']; @@ -48,7 +48,7 @@ export const useGetSearchResultsRecordingsQuery = < graphqlFetcher(GetSearchResultsRecordingsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSearchResultsRecordings( variables: ExactAlt diff --git a/src/containers/search/collections.tsx b/src/containers/search/collections.tsx index 261a86378..8079af1b0 100644 --- a/src/containers/search/collections.tsx +++ b/src/containers/search/collections.tsx @@ -2,13 +2,13 @@ import { useRouter } from 'next/router'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardCollection from '@components/molecules/card/collection'; -import PaginatedCardList from '@components/organisms/paginatedCardList'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardCollection from '~components/molecules/card/collection'; +import PaginatedCardList from '~components/organisms/paginatedCardList'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; import { GetSearchResultsCollectionsQuery } from './__generated__/collections'; export type SearchCollectionsProps = PaginatedProps< diff --git a/src/containers/search/index.spec.tsx b/src/containers/search/index.spec.tsx index f6b3396d4..9391d97da 100644 --- a/src/containers/search/index.spec.tsx +++ b/src/containers/search/index.spec.tsx @@ -1,14 +1,6 @@ +import { screen, waitFor } from '@testing-library/react'; import { __loadQuery } from 'next/router'; -import Search, { - getStaticPaths, - getStaticProps, -} from '@pages/[language]/search'; - -import { screen, waitFor } from '@testing-library/react'; -import { buildLoader } from '@lib/test/buildLoader'; -import { buildRenderer } from '@lib/test/buildRenderer'; -import { RecordingContentType } from '@src/__generated__/graphql'; import { GetSearchAudiobooksDocument, GetSearchAudiobooksQuery, @@ -26,7 +18,14 @@ import { GetSearchSponsorsQuery, GetSearchStoryProgramsDocument, GetSearchStoryProgramsQuery, -} from '@components/organisms/__generated__/searchResults'; +} from '~components/organisms/__generated__/searchResults'; +import { buildLoader } from '~lib/test/buildLoader'; +import { buildRenderer } from '~lib/test/buildRenderer'; +import Search, { + getStaticPaths, + getStaticProps, +} from '~pages/[language]/search'; +import { RecordingContentType } from '~src/__generated__/graphql'; jest.mock('next/head'); diff --git a/src/containers/search/index.tsx b/src/containers/search/index.tsx index a6f5d49a6..a87586b28 100644 --- a/src/containers/search/index.tsx +++ b/src/containers/search/index.tsx @@ -1,3 +1,3 @@ -import searchResults from '@components/organisms/searchResults'; +import searchResults from '~components/organisms/searchResults'; export default searchResults; diff --git a/src/containers/search/persons.tsx b/src/containers/search/persons.tsx index 9d381b20a..1294ffebf 100644 --- a/src/containers/search/persons.tsx +++ b/src/containers/search/persons.tsx @@ -2,13 +2,13 @@ import { useRouter } from 'next/router'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardPerson from '@components/molecules/card/person'; -import PaginatedCardList from '@components/organisms/paginatedCardList'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardPerson from '~components/molecules/card/person'; +import PaginatedCardList from '~components/organisms/paginatedCardList'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; import { GetSearchResultsPersonsQuery } from './__generated__/persons'; export type SearchPersonsProps = PaginatedProps< diff --git a/src/containers/search/sequences.tsx b/src/containers/search/sequences.tsx index 46c0ec324..3e079c722 100644 --- a/src/containers/search/sequences.tsx +++ b/src/containers/search/sequences.tsx @@ -2,13 +2,13 @@ import { useRouter } from 'next/router'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardSequence from '@components/molecules/card/sequence'; -import PaginatedCardList from '@components/organisms/paginatedCardList'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardSequence from '~components/molecules/card/sequence'; +import PaginatedCardList from '~components/organisms/paginatedCardList'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; import { GetSearchResultsSequencesQuery } from './__generated__/sequences'; export type SearchSequencesProps = PaginatedProps< diff --git a/src/containers/search/sponsors.tsx b/src/containers/search/sponsors.tsx index 3104e746e..3c7b890d5 100644 --- a/src/containers/search/sponsors.tsx +++ b/src/containers/search/sponsors.tsx @@ -2,13 +2,13 @@ import { useRouter } from 'next/router'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardSponsor from '@components/molecules/card/sponsor'; -import PaginatedCardList from '@components/organisms/paginatedCardList'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardSponsor from '~components/molecules/card/sponsor'; +import PaginatedCardList from '~components/organisms/paginatedCardList'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; import { GetSearchResultsSponsorsQuery } from './__generated__/sponsors'; export type SearchSponsorsProps = PaginatedProps< diff --git a/src/containers/search/teachings.tsx b/src/containers/search/teachings.tsx index 8d8cccb84..2ff63dfb8 100644 --- a/src/containers/search/teachings.tsx +++ b/src/containers/search/teachings.tsx @@ -2,13 +2,13 @@ import { useRouter } from 'next/router'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardRecording from '@components/molecules/card/recording'; -import PaginatedCardList from '@components/organisms/paginatedCardList'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardRecording from '~components/molecules/card/recording'; +import PaginatedCardList from '~components/organisms/paginatedCardList'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; import { GetSearchResultsRecordingsQuery } from './__generated__/teachings'; export type SearchTeachingsProps = PaginatedProps< diff --git a/src/containers/series/__generated__/detail.ts b/src/containers/series/__generated__/detail.ts index 4de4bac74..4cf63ec9f 100644 --- a/src/containers/series/__generated__/detail.ts +++ b/src/containers/series/__generated__/detail.ts @@ -9,7 +9,7 @@ import { TeaseRecordingFragmentDoc } from '../../../components/molecules/__gener import { AndMiniplayerFragmentDoc } from '../../../components/templates/__generated__/andMiniplayer'; import { GenerateFeedFragmentDoc } from '../../../lib/__generated__/generateFeed'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSeriesDetailPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -110,7 +110,7 @@ export const useGetSeriesDetailPathsDataQuery = < graphqlFetcher(GetSeriesDetailPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSeriesDetailPageData( variables: ExactAlt diff --git a/src/containers/series/__generated__/list.ts b/src/containers/series/__generated__/list.ts index eeb07e4eb..06c5fe3b9 100644 --- a/src/containers/series/__generated__/list.ts +++ b/src/containers/series/__generated__/list.ts @@ -3,7 +3,7 @@ import * as Types from '../../../__generated__/graphql'; import { CardSequenceFragmentDoc } from '../../../components/molecules/card/__generated__/sequence'; import { PersonLockupFragmentDoc } from '../../../components/molecules/__generated__/personLockup'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSeriesListPageDataQueryVariables = Types.Exact<{ language: Types.Language; offset: Types.InputMaybe; @@ -72,7 +72,7 @@ export const useGetSeriesListPathsDataQuery = < graphqlFetcher(GetSeriesListPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSeriesListPageData( variables: ExactAlt diff --git a/src/containers/series/detail.spec.tsx b/src/containers/series/detail.spec.tsx index 2ae4ab412..e12938e75 100644 --- a/src/containers/series/detail.spec.tsx +++ b/src/containers/series/detail.spec.tsx @@ -1,22 +1,23 @@ import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildLoader } from '@lib/test/buildLoader'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { DETAIL_PRERENDER_LIMIT } from '~lib/constants'; +import { buildLoader } from '~lib/test/buildLoader'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import SeriesDetail, { getStaticPaths, getStaticProps, -} from '@pages/[language]/series/[id]/[[...slug]]'; -import { DETAIL_PRERENDER_LIMIT } from '@lib/constants'; -import { - GetSeriesDetailPageDataDocument, - GetSeriesDetailPathsDataDocument, -} from './__generated__/detail'; +} from '~pages/[language]/series/[id]/[[...slug]]'; import { Language, RecordingContentType, SequenceContentType, -} from '@src/__generated__/graphql'; +} from '~src/__generated__/graphql'; + +import { + GetSeriesDetailPageDataDocument, + GetSeriesDetailPathsDataDocument, +} from './__generated__/detail'; const renderPage = buildStaticRenderer(SeriesDetail, getStaticProps); diff --git a/src/containers/series/detail.ts b/src/containers/series/detail.ts index 23dc5d6cf..ffa8afeb2 100644 --- a/src/containers/series/detail.ts +++ b/src/containers/series/detail.ts @@ -1,5 +1,6 @@ -import withFailStates from '@components/HOCs/withFailStates'; -import { Sequence } from '@components/organisms/sequence'; +import withFailStates from '~components/HOCs/withFailStates'; +import { Sequence } from '~components/organisms/sequence'; + import { GetSeriesDetailPageDataQuery } from './__generated__/detail'; export interface SeriesDetailProps { diff --git a/src/containers/series/list.spec.tsx b/src/containers/series/list.spec.tsx index c171b7bc9..fe12cda08 100644 --- a/src/containers/series/list.spec.tsx +++ b/src/containers/series/list.spec.tsx @@ -1,18 +1,19 @@ import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildLoader } from '@lib/test/buildLoader'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildLoader } from '~lib/test/buildLoader'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import SeriesList, { getStaticPaths, getStaticProps, -} from '@pages/[language]/series/page/[i]'; +} from '~pages/[language]/series/page/[i]'; +import { SequenceContentType } from '~src/__generated__/graphql'; + import { GetSeriesListPageDataDocument, GetSeriesListPathsDataDocument, } from './__generated__/list'; -import { SequenceContentType } from '@src/__generated__/graphql'; const renderPage = buildStaticRenderer(SeriesList, getStaticProps); diff --git a/src/containers/series/list.tsx b/src/containers/series/list.tsx index 8e4e10d30..4d9da8493 100644 --- a/src/containers/series/list.tsx +++ b/src/containers/series/list.tsx @@ -1,13 +1,13 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardSequence from '@components/molecules/card/sequence'; -import PaginatedCardList from '@components/organisms/paginatedCardList'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardSequence from '~components/molecules/card/sequence'; +import PaginatedCardList from '~components/organisms/paginatedCardList'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; import { GetSeriesListPageDataQuery } from './__generated__/list'; export type SeriesListProps = PaginatedProps< diff --git a/src/containers/sermon/__generated__/detail.ts b/src/containers/sermon/__generated__/detail.ts index 72edd9be7..03a4e104f 100644 --- a/src/containers/sermon/__generated__/detail.ts +++ b/src/containers/sermon/__generated__/detail.ts @@ -10,7 +10,7 @@ import { PlayerFragmentDoc } from '../../../components/molecules/__generated__/p import { ButtonDownloadFragmentDoc } from '../../../components/molecules/__generated__/buttonDownload'; import { ButtonShareRecordingFragmentDoc } from '../../../components/molecules/__generated__/buttonShareRecording'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSermonDetailDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -77,7 +77,7 @@ export const useGetSermonDetailStaticPathsQuery = < graphqlFetcher(GetSermonDetailStaticPathsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSermonDetailData( variables: ExactAlt diff --git a/src/containers/sermon/__generated__/list.ts b/src/containers/sermon/__generated__/list.ts index 9129cde13..c03548399 100644 --- a/src/containers/sermon/__generated__/list.ts +++ b/src/containers/sermon/__generated__/list.ts @@ -8,7 +8,7 @@ import { TeaseRecordingFragmentDoc } from '../../../components/molecules/__gener import { AndMiniplayerFragmentDoc } from '../../../components/templates/__generated__/andMiniplayer'; import { GenerateFeedFragmentDoc } from '../../../lib/__generated__/generateFeed'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSermonListPageDataQueryVariables = Types.Exact<{ language: Types.Language; hasVideo: Types.InputMaybe; @@ -116,7 +116,7 @@ export const useGetSermonListPagePathsDataQuery = < graphqlFetcher(GetSermonListPagePathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSermonListPageData( variables: ExactAlt diff --git a/src/containers/sermon/__generated__/trending.ts b/src/containers/sermon/__generated__/trending.ts index 0533f3f46..5c0dfba96 100644 --- a/src/containers/sermon/__generated__/trending.ts +++ b/src/containers/sermon/__generated__/trending.ts @@ -7,7 +7,7 @@ import { CardHatSponsorFragmentDoc } from '../../../components/molecules/card/ha import { TeaseRecordingFragmentDoc } from '../../../components/molecules/__generated__/teaseRecording'; import { AndMiniplayerFragmentDoc } from '../../../components/templates/__generated__/andMiniplayer'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetTrendingTeachingsPageDataQueryVariables = Types.Exact<{ language: Types.Language; hasVideo: Types.InputMaybe; @@ -50,7 +50,7 @@ export const useGetTrendingTeachingsPageDataQuery = < graphqlFetcher(GetTrendingTeachingsPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getTrendingTeachingsPageData( variables: ExactAlt diff --git a/src/containers/sermon/detail.spec.tsx b/src/containers/sermon/detail.spec.tsx index 2d8cea465..115d6fbe3 100644 --- a/src/containers/sermon/detail.spec.tsx +++ b/src/containers/sermon/detail.spec.tsx @@ -13,30 +13,31 @@ import React from 'react'; import ReactTestUtils from 'react-dom/test-utils'; import videojs from 'video.js'; -import AndMiniplayer from '@components/templates/andMiniplayer'; -import AndPlaybackContext from '@components/templates/andPlaybackContext'; -import { SermonDetailProps } from '@containers/sermon/detail'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; -import renderWithProviders from '@lib/test/renderWithProviders'; -import setPlayerMock from '@lib/test/setPlayerMock'; +import AndMiniplayer from '~components/templates/andMiniplayer'; +import AndPlaybackContext from '~components/templates/andPlaybackContext'; +import { SermonDetailProps } from '~containers/sermon/detail'; +import { fetchApi } from '~lib/api/fetchApi'; +import { DETAIL_PRERENDER_LIMIT } from '~lib/constants'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; +import renderWithProviders from '~lib/test/renderWithProviders'; +import setPlayerMock from '~lib/test/setPlayerMock'; import SermonDetail, { getStaticPaths, getStaticProps, -} from '@pages/[language]/teachings/[id]/[[...slug]]'; -import { DETAIL_PRERENDER_LIMIT } from '@lib/constants'; +} from '~pages/[language]/teachings/[id]/[[...slug]]'; import { Language, RecordingContentType, SequenceContentType, -} from '@src/__generated__/graphql'; +} from '~src/__generated__/graphql'; + import { GetSermonDetailDataDocument, GetSermonDetailStaticPathsDocument, } from './__generated__/detail'; jest.mock('video.js'); -jest.mock('@lib/api/fetchApi'); +jest.mock('~lib/api/fetchApi'); // WORKAROUND: https://github.com/vercel/next.js/issues/16864#issuecomment-702069418 function loadSermonDetailPathsData() { diff --git a/src/containers/sermon/detail.ts b/src/containers/sermon/detail.ts index 2ec7752a8..211769b10 100644 --- a/src/containers/sermon/detail.ts +++ b/src/containers/sermon/detail.ts @@ -1,5 +1,6 @@ -import withFailStates from '@components/HOCs/withFailStates'; -import { Recording } from '@components/organisms/recording'; +import withFailStates from '~components/HOCs/withFailStates'; +import { Recording } from '~components/organisms/recording'; + import { GetSermonDetailDataQuery } from './__generated__/detail'; export interface SermonDetailProps { diff --git a/src/containers/sermon/embed.tsx b/src/containers/sermon/embed.tsx index 022b1fccc..a0d89e083 100644 --- a/src/containers/sermon/embed.tsx +++ b/src/containers/sermon/embed.tsx @@ -1,20 +1,18 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import Heading6 from '@components/atoms/heading6'; -import withFailStates from '@components/HOCs/withFailStates'; -import PersonLockup from '@components/molecules/personLockup'; -import Player from '@components/molecules/player'; -import AndMiniplayer from '@components/templates/andMiniplayer'; - -import { getRecordingTypeTheme } from '@lib/getRecordingTheme'; -import { getSequenceTypeTheme } from '@lib/getSequenceType'; +import Heading1 from '~components/atoms/heading1'; +import Heading6 from '~components/atoms/heading6'; +import withFailStates from '~components/HOCs/withFailStates'; +import PersonLockup from '~components/molecules/personLockup'; +import Player from '~components/molecules/player'; +import AndMiniplayer from '~components/templates/andMiniplayer'; +import { getRecordingTypeTheme } from '~lib/getRecordingTheme'; +import { getSequenceTypeTheme } from '~lib/getSequenceType'; import Logo from '../../../public/img/logo-small.svg'; - -import styles from './embed.module.scss'; import { GetSermonDetailDataQuery } from './__generated__/detail'; +import styles from './embed.module.scss'; export interface SermonEmbedProps { recording: GetSermonDetailDataQuery['sermon']; diff --git a/src/containers/sermon/list.all.spec.tsx b/src/containers/sermon/list.all.spec.tsx index 937569900..6bcd1e670 100644 --- a/src/containers/sermon/list.all.spec.tsx +++ b/src/containers/sermon/list.all.spec.tsx @@ -1,21 +1,21 @@ import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { when } from 'jest-when'; -import { useRouter } from 'next/router'; -import { __loadQuery } from 'next/router'; +import { __loadQuery,useRouter } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; +import { fetchApi } from '~lib/api/fetchApi'; import { ENTRIES_PER_PAGE, LANGUAGES, LIST_PRERENDER_LIMIT, -} from '@lib/constants'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +} from '~lib/constants'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import SermonList, { getStaticPaths, getStaticProps, -} from '@pages/[language]/teachings/all/page/[i]'; -import { RecordingContentType } from '@src/__generated__/graphql'; +} from '~pages/[language]/teachings/all/page/[i]'; +import { RecordingContentType } from '~src/__generated__/graphql'; + import { GetSermonListPageDataDocument, GetSermonListPagePathsDataDocument, diff --git a/src/containers/sermon/list.audio.spec.tsx b/src/containers/sermon/list.audio.spec.tsx index 2c34fa031..3b08fbc9b 100644 --- a/src/containers/sermon/list.audio.spec.tsx +++ b/src/containers/sermon/list.audio.spec.tsx @@ -1,13 +1,17 @@ import { __loadQuery } from 'next/router'; -import { loadSermonListData } from '@containers/sermon/list.all.spec'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; -import { getStaticPaths } from '@pages/[language]/teachings/audio/page/[i]'; +import { loadSermonListData } from '~containers/sermon/list.all.spec'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import SermonList, { + getStaticPaths, getStaticProps, -} from '@pages/[language]/teachings/audio/page/[i]'; -import { GetSermonListPageDataDocument, GetSermonListPagePathsDataDocument } from './__generated__/list'; +} from '~pages/[language]/teachings/audio/page/[i]'; + +import { + GetSermonListPageDataDocument, + GetSermonListPagePathsDataDocument, +} from './__generated__/list'; const renderPage = buildStaticRenderer(SermonList, getStaticProps); diff --git a/src/containers/sermon/list.tsx b/src/containers/sermon/list.tsx index 7416961fc..19a7761dd 100644 --- a/src/containers/sermon/list.tsx +++ b/src/containers/sermon/list.tsx @@ -1,15 +1,15 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardRecording from '@components/molecules/card/recording'; -import RecordingHasVideoFilter from '@components/molecules/recordingHasVideoFilter'; -import RssAlternate from '@components/molecules/rssAlternate'; -import PaginatedCardList from '@components/organisms/paginatedCardList'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardRecording from '~components/molecules/card/recording'; +import RecordingHasVideoFilter from '~components/molecules/recordingHasVideoFilter'; +import RssAlternate from '~components/molecules/rssAlternate'; +import PaginatedCardList from '~components/organisms/paginatedCardList'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; import { GetSermonListPageDataQuery } from './__generated__/list'; export type SermonListProps = PaginatedProps< diff --git a/src/containers/sermon/list.video.spec.tsx b/src/containers/sermon/list.video.spec.tsx index ead1a3ce2..8d86b9cfb 100644 --- a/src/containers/sermon/list.video.spec.tsx +++ b/src/containers/sermon/list.video.spec.tsx @@ -3,13 +3,14 @@ import { __loadQuery, __mockedRouter } from 'next/router'; import { loadSermonListData, loadSermonListPagePathsData, -} from '@containers/sermon/list.all.spec'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; -import { getStaticPaths } from '@pages/[language]/teachings/video/page/[i]'; +} from '~containers/sermon/list.all.spec'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import SermonList, { + getStaticPaths, getStaticProps, -} from '@pages/[language]/teachings/video/page/[i]'; +} from '~pages/[language]/teachings/video/page/[i]'; + import { GetSermonListPageDataDocument, GetSermonListPagePathsDataDocument, diff --git a/src/containers/sermon/trending.tsx b/src/containers/sermon/trending.tsx index 03927118e..491cb07e0 100644 --- a/src/containers/sermon/trending.tsx +++ b/src/containers/sermon/trending.tsx @@ -1,18 +1,17 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import withFailStates from '@components/HOCs/withFailStates'; -import ButtonBack from '@components/molecules/buttonBack'; -import CardRecording from '@components/molecules/card/recording'; -import CardGroup from '@components/molecules/cardGroup'; -import RecordingHasVideoFilter from '@components/molecules/recordingHasVideoFilter'; +import Heading1 from '~components/atoms/heading1'; +import withFailStates from '~components/HOCs/withFailStates'; +import ButtonBack from '~components/molecules/buttonBack'; +import CardRecording from '~components/molecules/card/recording'; +import CardGroup from '~components/molecules/cardGroup'; +import RecordingHasVideoFilter from '~components/molecules/recordingHasVideoFilter'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; - -import styles from './trending.module.scss'; import { GetTrendingTeachingsPageDataQuery } from './__generated__/trending'; +import styles from './trending.module.scss'; export type TrendingTeachingsProps = NonNullable< GetTrendingTeachingsPageDataQuery['recordings'] diff --git a/src/containers/song/__generated__/detail.ts b/src/containers/song/__generated__/detail.ts index ffac5ddf2..09d3f3cdd 100644 --- a/src/containers/song/__generated__/detail.ts +++ b/src/containers/song/__generated__/detail.ts @@ -10,7 +10,7 @@ import { PlayerFragmentDoc } from '../../../components/molecules/__generated__/p import { ButtonDownloadFragmentDoc } from '../../../components/molecules/__generated__/buttonDownload'; import { ButtonShareRecordingFragmentDoc } from '../../../components/molecules/__generated__/buttonShareRecording'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSongDetailDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -76,7 +76,7 @@ export const useGetSongDetailStaticPathsQuery = < graphqlFetcher(GetSongDetailStaticPathsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSongDetailData( variables: ExactAlt diff --git a/src/containers/song/albums/__generated__/detail.ts b/src/containers/song/albums/__generated__/detail.ts index 67eb396c2..49be83762 100644 --- a/src/containers/song/albums/__generated__/detail.ts +++ b/src/containers/song/albums/__generated__/detail.ts @@ -9,7 +9,7 @@ import { TeaseRecordingFragmentDoc } from '../../../../components/molecules/__ge import { AndMiniplayerFragmentDoc } from '../../../../components/templates/__generated__/andMiniplayer'; import { GenerateFeedFragmentDoc } from '../../../../lib/__generated__/generateFeed'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSongAlbumsDetailPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -107,7 +107,7 @@ export const useGetSongAlbumsDetailPathsDataQuery = < graphqlFetcher(GetSongAlbumsDetailPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSongAlbumsDetailPageData( variables: ExactAlt diff --git a/src/containers/song/albums/__generated__/list.ts b/src/containers/song/albums/__generated__/list.ts index 9d027b2b2..cfccfea79 100644 --- a/src/containers/song/albums/__generated__/list.ts +++ b/src/containers/song/albums/__generated__/list.ts @@ -8,7 +8,7 @@ import { CardHatSponsorFragmentDoc } from '../../../../components/molecules/card import { TeaseRecordingFragmentDoc } from '../../../../components/molecules/__generated__/teaseRecording'; import { AndMiniplayerFragmentDoc } from '../../../../components/templates/__generated__/andMiniplayer'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSongAlbumsListPageDataQueryVariables = Types.Exact<{ language: Types.Language; }>; @@ -70,7 +70,7 @@ export const useGetSongAlbumsListPageDataQuery = < graphqlFetcher(GetSongAlbumsListPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSongAlbumsListPageData( variables: ExactAlt diff --git a/src/containers/song/albums/detail.spec.tsx b/src/containers/song/albums/detail.spec.tsx index fd90c5378..0f8353204 100644 --- a/src/containers/song/albums/detail.spec.tsx +++ b/src/containers/song/albums/detail.spec.tsx @@ -1,17 +1,18 @@ import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import Song, { getStaticPaths, getStaticProps, -} from '@pages/[language]/songs/albums/[id]/[[...slugs]]'; +} from '~pages/[language]/songs/albums/[id]/[[...slugs]]'; +import { SequenceContentType } from '~src/__generated__/graphql'; + import { GetSongAlbumsDetailPageDataDocument, GetSongAlbumsDetailPathsDataDocument, } from './__generated__/detail'; -import { SequenceContentType } from '@src/__generated__/graphql'; const renderPage = buildStaticRenderer(Song, getStaticProps); diff --git a/src/containers/song/albums/detail.ts b/src/containers/song/albums/detail.ts index 091544c92..c4d161bc7 100644 --- a/src/containers/song/albums/detail.ts +++ b/src/containers/song/albums/detail.ts @@ -1,5 +1,6 @@ -import withFailStates from '@components/HOCs/withFailStates'; -import { Sequence } from '@components/organisms/sequence'; +import withFailStates from '~components/HOCs/withFailStates'; +import { Sequence } from '~components/organisms/sequence'; + import { GetSongAlbumsDetailPageDataQuery } from './__generated__/detail'; export interface SongAlbumDetailProps { diff --git a/src/containers/song/albums/list.spec.tsx b/src/containers/song/albums/list.spec.tsx index f75f41b7b..1dbdfdae5 100644 --- a/src/containers/song/albums/list.spec.tsx +++ b/src/containers/song/albums/list.spec.tsx @@ -1,14 +1,15 @@ +import { screen } from '@testing-library/react'; import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import Songs, { getStaticPaths, getStaticProps, -} from '@pages/[language]/songs/albums'; -import { screen } from '@testing-library/react'; -import { SequenceContentType } from '@src/__generated__/graphql'; +} from '~pages/[language]/songs/albums'; +import { SequenceContentType } from '~src/__generated__/graphql'; + import { GetSongAlbumsListPageDataDocument } from './__generated__/list'; const renderPage = buildStaticRenderer(Songs, getStaticProps); diff --git a/src/containers/song/albums/list.tsx b/src/containers/song/albums/list.tsx index 315aac18d..5ad947c33 100644 --- a/src/containers/song/albums/list.tsx +++ b/src/containers/song/albums/list.tsx @@ -2,19 +2,18 @@ import clsx from 'clsx'; import React, { useState } from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import ButtonBack from '@components/molecules/buttonBack'; -import CardSequence from '@components/molecules/card/sequence'; -import CardSongBook from '@components/molecules/card/songBook'; -import CardGroup from '@components/molecules/cardGroup'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import Mininav from '@components/molecules/mininav'; +import Heading1 from '~components/atoms/heading1'; +import ButtonBack from '~components/molecules/buttonBack'; +import CardSequence from '~components/molecules/card/sequence'; +import CardSongBook from '~components/molecules/card/songBook'; +import CardGroup from '~components/molecules/cardGroup'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import Mininav from '~components/molecules/mininav'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; - -import styles from './list.module.scss'; import { GetSongAlbumsListPageDataQuery } from './__generated__/list'; +import styles from './list.module.scss'; export type SongAlbumsListProps = GetSongAlbumsListPageDataQuery; diff --git a/src/containers/song/books/__generated__/detail.ts b/src/containers/song/books/__generated__/detail.ts index 310db2dbd..ddf539f5b 100644 --- a/src/containers/song/books/__generated__/detail.ts +++ b/src/containers/song/books/__generated__/detail.ts @@ -7,7 +7,7 @@ import { CardHatSponsorFragmentDoc } from '../../../../components/molecules/card import { TeaseRecordingFragmentDoc } from '../../../../components/molecules/__generated__/teaseRecording'; import { AndMiniplayerFragmentDoc } from '../../../../components/templates/__generated__/andMiniplayer'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSongBooksDetailPageDataQueryVariables = Types.Exact<{ language: Types.Language; book: Types.Scalars['String']; @@ -48,7 +48,7 @@ export const useGetSongBooksDetailPageDataQuery = < graphqlFetcher(GetSongBooksDetailPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSongBooksDetailPageData( variables: ExactAlt diff --git a/src/containers/song/books/__generated__/track.ts b/src/containers/song/books/__generated__/track.ts index 9ee718c2e..78deab0f6 100644 --- a/src/containers/song/books/__generated__/track.ts +++ b/src/containers/song/books/__generated__/track.ts @@ -10,7 +10,7 @@ import { PlayerFragmentDoc } from '../../../../components/molecules/__generated_ import { ButtonDownloadFragmentDoc } from '../../../../components/molecules/__generated__/buttonDownload'; import { ButtonShareRecordingFragmentDoc } from '../../../../components/molecules/__generated__/buttonShareRecording'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetBookSongDetailDataQueryVariables = Types.Exact<{ language: Types.Language; id: Types.Scalars['ID']; @@ -59,7 +59,7 @@ export const useGetBookSongDetailDataQuery = < graphqlFetcher(GetBookSongDetailDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getBookSongDetailData( variables: ExactAlt diff --git a/src/containers/song/books/detail.spec.tsx b/src/containers/song/books/detail.spec.tsx index e826d7380..432fc0d29 100644 --- a/src/containers/song/books/detail.spec.tsx +++ b/src/containers/song/books/detail.spec.tsx @@ -1,14 +1,15 @@ import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import Song, { getStaticPaths, getStaticProps, -} from '@pages/[language]/songs/book/[book]'; +} from '~pages/[language]/songs/book/[book]'; +import { RecordingContentType } from '~src/__generated__/graphql'; + import { GetSongBooksDetailPageDataDocument } from './__generated__/detail'; -import { RecordingContentType } from '@src/__generated__/graphql'; const renderPage = buildStaticRenderer(Song, getStaticProps); diff --git a/src/containers/song/books/detail.tsx b/src/containers/song/books/detail.tsx index e5ae87262..68cc34346 100644 --- a/src/containers/song/books/detail.tsx +++ b/src/containers/song/books/detail.tsx @@ -2,24 +2,24 @@ import startCase from 'lodash/startCase'; import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import withFailStates from '@components/HOCs/withFailStates'; -import ButtonBack from '@components/molecules/buttonBack'; -import ButtonShare from '@components/molecules/buttonShare'; -import CardSong from '@components/molecules/card/song'; -import CardGroup from '@components/molecules/cardGroup'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import SequenceTypeLockup from '@components/molecules/sequenceTypeLockup'; -import Tease from '@components/molecules/tease'; -import { BaseColors } from '@lib/constants'; -import root from '@lib/routes'; -import { useFormattedDuration } from '@lib/time'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import withFailStates from '~components/HOCs/withFailStates'; +import ButtonBack from '~components/molecules/buttonBack'; +import ButtonShare from '~components/molecules/buttonShare'; +import CardSong from '~components/molecules/card/song'; +import CardGroup from '~components/molecules/cardGroup'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import SequenceTypeLockup from '~components/molecules/sequenceTypeLockup'; +import Tease from '~components/molecules/tease'; +import { BaseColors } from '~lib/constants'; +import root from '~lib/routes'; +import { useFormattedDuration } from '~lib/time'; +import useLanguageRoute from '~lib/useLanguageRoute'; +import { SequenceContentType } from '~src/__generated__/graphql'; -import styles from './detail.module.scss'; -import { SequenceContentType } from '@src/__generated__/graphql'; import { GetSongBooksDetailPageDataQuery } from './__generated__/detail'; +import styles from './detail.module.scss'; export type SongBooksDetailProps = { book: string; diff --git a/src/containers/song/books/track.tsx b/src/containers/song/books/track.tsx index c67c975d5..38152287c 100644 --- a/src/containers/song/books/track.tsx +++ b/src/containers/song/books/track.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import withFailStates from '@components/HOCs/withFailStates'; -import { Recording } from '@components/organisms/recording'; +import withFailStates from '~components/HOCs/withFailStates'; +import { Recording } from '~components/organisms/recording'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; import { GetBookSongDetailDataQuery } from './__generated__/track'; export type SongTrack = NonNullable; diff --git a/src/containers/song/detail.ts b/src/containers/song/detail.ts index fcd82b312..89f875974 100644 --- a/src/containers/song/detail.ts +++ b/src/containers/song/detail.ts @@ -1,5 +1,6 @@ -import withFailStates from '@components/HOCs/withFailStates'; -import { Recording } from '@components/organisms/recording'; +import withFailStates from '~components/HOCs/withFailStates'; +import { Recording } from '~components/organisms/recording'; + import { GetSongDetailDataQuery } from './__generated__/detail'; export type SongTrack = NonNullable; diff --git a/src/containers/sponsor/__generated__/conferences.ts b/src/containers/sponsor/__generated__/conferences.ts index c4bb06509..7a5c5c1e4 100644 --- a/src/containers/sponsor/__generated__/conferences.ts +++ b/src/containers/sponsor/__generated__/conferences.ts @@ -3,7 +3,7 @@ import * as Types from '../../../__generated__/graphql'; import { SponsorPivotFragmentDoc } from './pivot'; import { CardCollectionFragmentDoc } from '../../../components/molecules/card/__generated__/collection'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSponsorConferencesPageDataQueryVariables = Types.Exact<{ language: Types.Language; id: Types.Scalars['ID']; @@ -78,7 +78,7 @@ export const useGetSponsorConferencesPathsDataQuery = < graphqlFetcher(GetSponsorConferencesPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSponsorConferencesPageData( variables: ExactAlt diff --git a/src/containers/sponsor/__generated__/detail.ts b/src/containers/sponsor/__generated__/detail.ts index b42d40164..992e5de02 100644 --- a/src/containers/sponsor/__generated__/detail.ts +++ b/src/containers/sponsor/__generated__/detail.ts @@ -9,7 +9,7 @@ import { CardHatSponsorFragmentDoc } from '../../../components/molecules/card/ha import { TeaseRecordingFragmentDoc } from '../../../components/molecules/__generated__/teaseRecording'; import { AndMiniplayerFragmentDoc } from '../../../components/templates/__generated__/andMiniplayer'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSponsorDetailPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -119,7 +119,7 @@ export const useGetSponsorDetailPathsDataQuery = < graphqlFetcher(GetSponsorDetailPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSponsorDetailPageData( variables: ExactAlt diff --git a/src/containers/sponsor/__generated__/series.ts b/src/containers/sponsor/__generated__/series.ts index b390009f6..eb6b3945f 100644 --- a/src/containers/sponsor/__generated__/series.ts +++ b/src/containers/sponsor/__generated__/series.ts @@ -4,7 +4,7 @@ import { SponsorPivotFragmentDoc } from './pivot'; import { CardSequenceFragmentDoc } from '../../../components/molecules/card/__generated__/sequence'; import { PersonLockupFragmentDoc } from '../../../components/molecules/__generated__/personLockup'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSponsorSeriesPageDataQueryVariables = Types.Exact<{ language: Types.Language; id: Types.Scalars['ID']; @@ -80,7 +80,7 @@ export const useGetSponsorSeriesPathsDataQuery = < graphqlFetcher(GetSponsorSeriesPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSponsorSeriesPageData( variables: ExactAlt diff --git a/src/containers/sponsor/__generated__/teachings.ts b/src/containers/sponsor/__generated__/teachings.ts index 061cacb1d..10400af3a 100644 --- a/src/containers/sponsor/__generated__/teachings.ts +++ b/src/containers/sponsor/__generated__/teachings.ts @@ -9,7 +9,7 @@ import { TeaseRecordingFragmentDoc } from '../../../components/molecules/__gener import { AndMiniplayerFragmentDoc } from '../../../components/templates/__generated__/andMiniplayer'; import { GenerateFeedFragmentDoc } from '../../../lib/__generated__/generateFeed'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSponsorTeachingsPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; offset: Types.InputMaybe; @@ -120,7 +120,7 @@ export const useGetSponsorTeachingsPathsDataQuery = < graphqlFetcher(GetSponsorTeachingsPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSponsorTeachingsPageData( variables: ExactAlt diff --git a/src/containers/sponsor/conferences.spec.tsx b/src/containers/sponsor/conferences.spec.tsx index 77fc25b49..052032e74 100644 --- a/src/containers/sponsor/conferences.spec.tsx +++ b/src/containers/sponsor/conferences.spec.tsx @@ -1,13 +1,14 @@ import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildLoader } from '@lib/test/buildLoader'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildLoader } from '~lib/test/buildLoader'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import SponsorConferences, { getStaticPaths, getStaticProps, -} from '@pages/[language]/sponsors/[id]/conferences/page/[i]'; +} from '~pages/[language]/sponsors/[id]/conferences/page/[i]'; + import { GetSponsorConferencesPageDataDocument, GetSponsorConferencesPathsDataDocument, diff --git a/src/containers/sponsor/conferences.tsx b/src/containers/sponsor/conferences.tsx index 8a5223de6..ebd5843d7 100644 --- a/src/containers/sponsor/conferences.tsx +++ b/src/containers/sponsor/conferences.tsx @@ -1,18 +1,18 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import LineHeading from '@components/atoms/lineHeading'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardCollection from '@components/molecules/card/collection'; -import CardGroup from '@components/molecules/cardGroup'; -import Pagination from '@components/molecules/pagination'; -import { BaseColors } from '@lib/constants'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; +import LineHeading from '~components/atoms/lineHeading'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardCollection from '~components/molecules/card/collection'; +import CardGroup from '~components/molecules/cardGroup'; +import Pagination from '~components/molecules/pagination'; +import { BaseColors } from '~lib/constants'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; -import SponsorPivot from './pivot'; import { GetSponsorConferencesPageDataQuery } from './__generated__/conferences'; import { SponsorPivotFragment } from './__generated__/pivot'; +import SponsorPivot from './pivot'; export type SponsorConferencesProps = PaginatedProps< NonNullable[0], diff --git a/src/containers/sponsor/detail.spec.tsx b/src/containers/sponsor/detail.spec.tsx index 9d210715a..f3d94dea2 100644 --- a/src/containers/sponsor/detail.spec.tsx +++ b/src/containers/sponsor/detail.spec.tsx @@ -1,13 +1,14 @@ import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import SponsorDetail, { getStaticPaths, getStaticProps, -} from '@pages/[language]/sponsors/[id]/[[...slugs]]'; -import { Language, SequenceContentType } from '@src/__generated__/graphql'; +} from '~pages/[language]/sponsors/[id]/[[...slugs]]'; +import { Language, SequenceContentType } from '~src/__generated__/graphql'; + import { GetSponsorDetailPageDataDocument, GetSponsorDetailPathsDataDocument, diff --git a/src/containers/sponsor/detail.tsx b/src/containers/sponsor/detail.tsx index b6e9b271b..f43df3eee 100644 --- a/src/containers/sponsor/detail.tsx +++ b/src/containers/sponsor/detail.tsx @@ -2,35 +2,33 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading2 from '@components/atoms/heading2'; -import Heading6 from '@components/atoms/heading6'; -import HorizontalRule from '@components/atoms/horizontalRule'; -import LineHeading from '@components/atoms/lineHeading'; -import RoundImage from '@components/atoms/roundImage'; -import withFailStates from '@components/HOCs/withFailStates'; -import Button from '@components/molecules/button'; -import ButtonFavorite from '@components/molecules/buttonFavorite'; -import ButtonShare from '@components/molecules/buttonShare'; -import CardCollection from '@components/molecules/card/collection'; -import CardRecording from '@components/molecules/card/recording'; -import CardSequence from '@components/molecules/card/sequence'; -import CardGroup from '@components/molecules/cardGroup'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; +import Heading2 from '~components/atoms/heading2'; +import Heading6 from '~components/atoms/heading6'; +import HorizontalRule from '~components/atoms/horizontalRule'; +import LineHeading from '~components/atoms/lineHeading'; +import RoundImage from '~components/atoms/roundImage'; +import withFailStates from '~components/HOCs/withFailStates'; +import Button from '~components/molecules/button'; +import ButtonFavorite from '~components/molecules/buttonFavorite'; +import ButtonShare from '~components/molecules/buttonShare'; +import CardCollection from '~components/molecules/card/collection'; +import CardRecording from '~components/molecules/card/recording'; +import CardSequence from '~components/molecules/card/sequence'; +import CardGroup from '~components/molecules/cardGroup'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; import DefinitionList, { IDefinitionListTerm, -} from '@components/molecules/definitionList'; -import SponsorTypeLockup from '@components/molecules/sponsorTypeLockup'; -import Tease from '@components/molecules/tease'; -import { useIsSponsorFavorited } from '@lib/api/useIsSponsorFavorited'; -import { BaseColors } from '@lib/constants'; - -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +} from '~components/molecules/definitionList'; +import SponsorTypeLockup from '~components/molecules/sponsorTypeLockup'; +import Tease from '~components/molecules/tease'; +import { useIsSponsorFavorited } from '~lib/api/useIsSponsorFavorited'; +import { BaseColors } from '~lib/constants'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; import ForwardIcon from '../../../public/img/icons/icon-forward-light.svg'; - -import styles from './detail.module.scss'; import { GetSponsorDetailPageDataQuery } from './__generated__/detail'; +import styles from './detail.module.scss'; export type SponsorDetailProps = GetSponsorDetailPageDataQuery; diff --git a/src/containers/sponsor/list/__generated__/all.ts b/src/containers/sponsor/list/__generated__/all.ts index 1c440c6a3..77950d331 100644 --- a/src/containers/sponsor/list/__generated__/all.ts +++ b/src/containers/sponsor/list/__generated__/all.ts @@ -2,7 +2,7 @@ import * as Types from '../../../../__generated__/graphql'; import { SponsorListEntryFragmentDoc } from './list'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSponsorListAllPageDataQueryVariables = Types.Exact<{ language: Types.Language; after: Types.InputMaybe; @@ -42,7 +42,7 @@ export const useGetSponsorListAllPageDataQuery = < graphqlFetcher(GetSponsorListAllPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSponsorListAllPageData( variables: ExactAlt diff --git a/src/containers/sponsor/list/__generated__/letter.ts b/src/containers/sponsor/list/__generated__/letter.ts index 81634343f..bf8fc8587 100644 --- a/src/containers/sponsor/list/__generated__/letter.ts +++ b/src/containers/sponsor/list/__generated__/letter.ts @@ -2,7 +2,7 @@ import * as Types from '../../../../__generated__/graphql'; import { SponsorListEntryFragmentDoc } from './list'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetSponsorListLetterPageDataQueryVariables = Types.Exact<{ language: Types.Language; startsWith: Types.InputMaybe; @@ -42,7 +42,7 @@ export const useGetSponsorListLetterPageDataQuery = < graphqlFetcher(GetSponsorListLetterPageDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSponsorListLetterPageData( variables: ExactAlt diff --git a/src/containers/sponsor/list/__generated__/list.ts b/src/containers/sponsor/list/__generated__/list.ts index f4380d95b..5d0a7c85a 100644 --- a/src/containers/sponsor/list/__generated__/list.ts +++ b/src/containers/sponsor/list/__generated__/list.ts @@ -1,7 +1,7 @@ import * as Types from '../../../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type SponsorListEntryFragment = { __typename?: 'Sponsor', canonicalPath: string, title: string, image: { __typename?: 'Image', url: string } | null }; export type GetSponsorListLetterCountsQueryVariables = Types.Exact<{ @@ -40,7 +40,7 @@ export const useGetSponsorListLetterCountsQuery = < graphqlFetcher(GetSponsorListLetterCountsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getSponsorListLetterCounts( variables: ExactAlt diff --git a/src/containers/sponsor/list/all.spec.tsx b/src/containers/sponsor/list/all.spec.tsx index a751df52b..e03a510d4 100644 --- a/src/containers/sponsor/list/all.spec.tsx +++ b/src/containers/sponsor/list/all.spec.tsx @@ -1,10 +1,12 @@ -import { buildLoader } from '@lib/test/buildLoader'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { screen } from '@testing-library/react'; + +import { buildLoader } from '~lib/test/buildLoader'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import Sponsors, { getStaticPaths, getStaticProps, -} from '@pages/[language]/sponsors/all'; -import { screen } from '@testing-library/react'; +} from '~pages/[language]/sponsors/all'; + import { GetSponsorListLetterCountsDocument } from './__generated__/list'; const renderPage = buildStaticRenderer(Sponsors, getStaticProps); diff --git a/src/containers/sponsor/list/all.tsx b/src/containers/sponsor/list/all.tsx index 775b9ee6f..037bc9aec 100644 --- a/src/containers/sponsor/list/all.tsx +++ b/src/containers/sponsor/list/all.tsx @@ -1,15 +1,17 @@ -import Sponsors, { SponsorsProps } from './list'; import React, { useEffect, useRef } from 'react'; -import { useInfiniteQuery } from 'react-query'; -import { fetchApi } from '@lib/api/fetchApi'; -import { useLanguageId } from '@lib/useLanguageId'; -import useOnScreen from '@lib/hooks/useOnScreen'; import { useIntl } from 'react-intl'; +import { useInfiniteQuery } from 'react-query'; + +import { fetchApi } from '~lib/api/fetchApi'; +import useOnScreen from '~lib/hooks/useOnScreen'; +import { useLanguageId } from '~lib/useLanguageId'; +import { Maybe } from '~src/__generated__/graphql'; + import { GetSponsorListAllPageDataDocument, GetSponsorListAllPageDataQuery, } from './__generated__/all'; -import { Maybe } from '@src/__generated__/graphql'; +import Sponsors, { SponsorsProps } from './list'; type Props = Omit; diff --git a/src/containers/sponsor/list/letter.spec.tsx b/src/containers/sponsor/list/letter.spec.tsx index f89d9ac36..e84867a41 100644 --- a/src/containers/sponsor/list/letter.spec.tsx +++ b/src/containers/sponsor/list/letter.spec.tsx @@ -1,14 +1,15 @@ +import { screen } from '@testing-library/react'; import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildLoader } from '~lib/test/buildLoader'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import Sponsors, { getStaticPaths, getStaticProps, -} from '@pages/[language]/sponsors/letter/[letter]'; -import { buildLoader } from '@lib/test/buildLoader'; -import { screen } from '@testing-library/react'; +} from '~pages/[language]/sponsors/letter/[letter]'; + import { GetSponsorListLetterPageDataDocument } from './__generated__/letter'; import { GetSponsorListLetterCountsDocument } from './__generated__/list'; diff --git a/src/containers/sponsor/list/letter.tsx b/src/containers/sponsor/list/letter.tsx index 95ae8448a..ad1814464 100644 --- a/src/containers/sponsor/list/letter.tsx +++ b/src/containers/sponsor/list/letter.tsx @@ -1,7 +1,9 @@ -import withFailStates from '@components/HOCs/withFailStates'; -import Sponsors, { SponsorsProps } from './list'; import React from 'react'; +import withFailStates from '~components/HOCs/withFailStates'; + +import Sponsors, { SponsorsProps } from './list'; + export type { SponsorsProps } from './list'; function LetterSponsors(props: SponsorsProps) { diff --git a/src/containers/sponsor/list/list.tsx b/src/containers/sponsor/list/list.tsx index 664f34f68..91d2cea25 100644 --- a/src/containers/sponsor/list/list.tsx +++ b/src/containers/sponsor/list/list.tsx @@ -2,20 +2,20 @@ import Link from 'next/link'; import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import Heading2 from '@components/atoms/heading2'; -import RoundImage from '@components/atoms/roundImage'; -import ButtonBack from '@components/molecules/buttonBack'; -import Card from '@components/molecules/card'; -import JumpBar from '@components/molecules/jumpBar'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import Heading1 from '~components/atoms/heading1'; +import Heading2 from '~components/atoms/heading2'; +import RoundImage from '~components/atoms/roundImage'; +import ButtonBack from '~components/molecules/buttonBack'; +import Card from '~components/molecules/card'; +import JumpBar from '~components/molecules/jumpBar'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import styles from './list.module.scss'; import { GetSponsorListLetterCountsQuery, SponsorListEntryFragment, } from './__generated__/list'; +import styles from './list.module.scss'; export type SponsorsProps = { sponsors: SponsorListEntryFragment[]; diff --git a/src/containers/sponsor/pivot.tsx b/src/containers/sponsor/pivot.tsx index 33c2c58c3..685613a97 100644 --- a/src/containers/sponsor/pivot.tsx +++ b/src/containers/sponsor/pivot.tsx @@ -1,14 +1,14 @@ import React, { PropsWithChildren } from 'react'; -import Heading2 from '@components/atoms/heading2'; -import RoundImage from '@components/atoms/roundImage'; -import ButtonBack from '@components/molecules/buttonBack'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import SponsorTypeLockup from '@components/molecules/sponsorTypeLockup'; -import Tease from '@components/molecules/tease'; +import Heading2 from '~components/atoms/heading2'; +import RoundImage from '~components/atoms/roundImage'; +import ButtonBack from '~components/molecules/buttonBack'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import SponsorTypeLockup from '~components/molecules/sponsorTypeLockup'; +import Tease from '~components/molecules/tease'; -import styles from './pivot.module.scss'; import { SponsorPivotFragment } from './__generated__/pivot'; +import styles from './pivot.module.scss'; type Props = { sponsor: SponsorPivotFragment; diff --git a/src/containers/sponsor/series.spec.tsx b/src/containers/sponsor/series.spec.tsx index 703387dd7..2271c973d 100644 --- a/src/containers/sponsor/series.spec.tsx +++ b/src/containers/sponsor/series.spec.tsx @@ -1,18 +1,19 @@ import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildLoader } from '@lib/test/buildLoader'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildLoader } from '~lib/test/buildLoader'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import SponsorSeries, { getStaticPaths, getStaticProps, -} from '@pages/[language]/sponsors/[id]/series/page/[i]'; +} from '~pages/[language]/sponsors/[id]/series/page/[i]'; +import { SequenceContentType } from '~src/__generated__/graphql'; + import { GetSponsorSeriesPageDataDocument, GetSponsorSeriesPathsDataDocument, } from './__generated__/series'; -import { SequenceContentType } from '@src/__generated__/graphql'; const renderPage = buildStaticRenderer(SponsorSeries, getStaticProps); diff --git a/src/containers/sponsor/series.tsx b/src/containers/sponsor/series.tsx index d83a5ffaf..6ec4ce88a 100644 --- a/src/containers/sponsor/series.tsx +++ b/src/containers/sponsor/series.tsx @@ -1,18 +1,18 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import LineHeading from '@components/atoms/lineHeading'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardSequence from '@components/molecules/card/sequence'; -import CardGroup from '@components/molecules/cardGroup'; -import Pagination from '@components/molecules/pagination'; -import { BaseColors } from '@lib/constants'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; +import LineHeading from '~components/atoms/lineHeading'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardSequence from '~components/molecules/card/sequence'; +import CardGroup from '~components/molecules/cardGroup'; +import Pagination from '~components/molecules/pagination'; +import { BaseColors } from '~lib/constants'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; -import SponsorPivot from './pivot'; import { SponsorPivotFragment } from './__generated__/pivot'; import { GetSponsorSeriesPageDataQuery } from './__generated__/series'; +import SponsorPivot from './pivot'; export type SponsorSeriesProps = PaginatedProps< NonNullable[0], diff --git a/src/containers/sponsor/teachings.spec.tsx b/src/containers/sponsor/teachings.spec.tsx index 2f1066368..44da883ce 100644 --- a/src/containers/sponsor/teachings.spec.tsx +++ b/src/containers/sponsor/teachings.spec.tsx @@ -1,14 +1,15 @@ import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildLoader } from '@lib/test/buildLoader'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildLoader } from '~lib/test/buildLoader'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import SponsorTeachings, { getStaticPaths, getStaticProps, -} from '@pages/[language]/sponsors/[id]/teachings/page/[i]'; -import { RecordingContentType } from '@src/__generated__/graphql'; +} from '~pages/[language]/sponsors/[id]/teachings/page/[i]'; +import { RecordingContentType } from '~src/__generated__/graphql'; + import { GetSponsorTeachingsPageDataDocument, GetSponsorTeachingsPathsDataDocument, diff --git a/src/containers/sponsor/teachings.tsx b/src/containers/sponsor/teachings.tsx index 0f9d5e596..af9472f3e 100644 --- a/src/containers/sponsor/teachings.tsx +++ b/src/containers/sponsor/teachings.tsx @@ -1,20 +1,20 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import LineHeading from '@components/atoms/lineHeading'; -import withFailStates from '@components/HOCs/withFailStates'; -import CardRecording from '@components/molecules/card/recording'; -import CardGroup from '@components/molecules/cardGroup'; -import Pagination from '@components/molecules/pagination'; -import RssAlternate from '@components/molecules/rssAlternate'; -import { BaseColors } from '@lib/constants'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import LineHeading from '~components/atoms/lineHeading'; +import withFailStates from '~components/HOCs/withFailStates'; +import CardRecording from '~components/molecules/card/recording'; +import CardGroup from '~components/molecules/cardGroup'; +import Pagination from '~components/molecules/pagination'; +import RssAlternate from '~components/molecules/rssAlternate'; +import { BaseColors } from '~lib/constants'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import SponsorPivot from './pivot'; -import { GetSponsorTeachingsPageDataQuery } from './__generated__/teachings'; import { SponsorPivotFragment } from './__generated__/pivot'; +import { GetSponsorTeachingsPageDataQuery } from './__generated__/teachings'; +import SponsorPivot from './pivot'; export type SponsorTeachingsProps = PaginatedProps< NonNullable< diff --git a/src/containers/story/__generated__/detail.ts b/src/containers/story/__generated__/detail.ts index d9d1fb341..4131df3d0 100644 --- a/src/containers/story/__generated__/detail.ts +++ b/src/containers/story/__generated__/detail.ts @@ -10,7 +10,7 @@ import { PlayerFragmentDoc } from '../../../components/molecules/__generated__/p import { ButtonDownloadFragmentDoc } from '../../../components/molecules/__generated__/buttonDownload'; import { ButtonShareRecordingFragmentDoc } from '../../../components/molecules/__generated__/buttonShareRecording'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetStoryDetailDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -76,7 +76,7 @@ export const useGetStoryDetailStaticPathsQuery = < graphqlFetcher(GetStoryDetailStaticPathsDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getStoryDetailData( variables: ExactAlt diff --git a/src/containers/story/albums/__generated__/detail.ts b/src/containers/story/albums/__generated__/detail.ts index 5d130e1c3..9472a2eba 100644 --- a/src/containers/story/albums/__generated__/detail.ts +++ b/src/containers/story/albums/__generated__/detail.ts @@ -10,7 +10,7 @@ import { AndMiniplayerFragmentDoc } from '../../../../components/templates/__gen import { GenerateFeedFragmentDoc } from '../../../../lib/__generated__/generateFeed'; import { BookFeedDescriptionFragmentDoc } from '../../../../pages/[language]/books/[id]/feed.xml/__generated__/bookFeedDescription'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetStoryAlbumDetailPageDataQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -114,7 +114,7 @@ export const useGetStoryAlbumDetailPathsDataQuery = < graphqlFetcher(GetStoryAlbumDetailPathsDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getStoryAlbumDetailPageData( variables: ExactAlt diff --git a/src/containers/story/albums/__generated__/list.ts b/src/containers/story/albums/__generated__/list.ts index d9c97a67d..df6ac7ea6 100644 --- a/src/containers/story/albums/__generated__/list.ts +++ b/src/containers/story/albums/__generated__/list.ts @@ -3,7 +3,7 @@ import * as Types from '../../../../__generated__/graphql'; import { CardSequenceFragmentDoc } from '../../../../components/molecules/card/__generated__/sequence'; import { PersonLockupFragmentDoc } from '../../../../components/molecules/__generated__/personLockup'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetStoriesAlbumsPageDataQueryVariables = Types.Exact<{ language: Types.Language; first: Types.InputMaybe; @@ -67,7 +67,7 @@ export const useGetStoriesAlbumsPathDataQuery = < graphqlFetcher(GetStoriesAlbumsPathDataDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getStoriesAlbumsPageData( variables: ExactAlt diff --git a/src/containers/story/albums/detail.ts b/src/containers/story/albums/detail.ts index b5c3dd2d7..ee9b28392 100644 --- a/src/containers/story/albums/detail.ts +++ b/src/containers/story/albums/detail.ts @@ -1,5 +1,6 @@ -import withFailStates from '@components/HOCs/withFailStates'; -import { Sequence } from '@components/organisms/sequence'; +import withFailStates from '~components/HOCs/withFailStates'; +import { Sequence } from '~components/organisms/sequence'; + import { GetStoryAlbumDetailPageDataQuery } from './__generated__/detail'; export interface StoryAlbumDetailProps { diff --git a/src/containers/story/albums/list.spec.tsx b/src/containers/story/albums/list.spec.tsx index 5a66adfbc..f07819766 100644 --- a/src/containers/story/albums/list.spec.tsx +++ b/src/containers/story/albums/list.spec.tsx @@ -1,15 +1,16 @@ +import { screen } from '@testing-library/react'; import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildLoader } from '~lib/test/buildLoader'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import StoryAlbumsList, { getStaticPaths, getStaticProps, -} from '@pages/[language]/stories/albums/page/[i]'; -import { buildLoader } from '@lib/test/buildLoader'; -import { screen } from '@testing-library/react'; -import { SequenceContentType } from '@src/__generated__/graphql'; +} from '~pages/[language]/stories/albums/page/[i]'; +import { SequenceContentType } from '~src/__generated__/graphql'; + import { GetStoriesAlbumsPageDataDocument, GetStoriesAlbumsPathDataDocument, diff --git a/src/containers/story/albums/list.tsx b/src/containers/story/albums/list.tsx index 16581e1c1..3294593b1 100644 --- a/src/containers/story/albums/list.tsx +++ b/src/containers/story/albums/list.tsx @@ -1,13 +1,13 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import CardSequence from '@components/molecules/card/sequence'; -import PaginatedCardList from '@components/organisms/paginatedCardList'; +import CardSequence from '~components/molecules/card/sequence'; +import EmptyState from '~components/organisms/emptyState'; +import PaginatedCardList from '~components/organisms/paginatedCardList'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; -import EmptyState from '@components/organisms/emptyState'; import { GetStoriesAlbumsPageDataQuery } from './__generated__/list'; export type StoryAlbumsListProps = PaginatedProps< diff --git a/src/containers/story/detail.spec.tsx b/src/containers/story/detail.spec.tsx index 0645925e5..dda4762ed 100644 --- a/src/containers/story/detail.spec.tsx +++ b/src/containers/story/detail.spec.tsx @@ -1,17 +1,18 @@ import { when } from 'jest-when'; import { __loadQuery } from 'next/router'; -import { fetchApi } from '@lib/api/fetchApi'; -import { buildStaticRenderer } from '@lib/test/buildStaticRenderer'; +import { fetchApi } from '~lib/api/fetchApi'; +import { buildStaticRenderer } from '~lib/test/buildStaticRenderer'; import Story, { getStaticPaths, getStaticProps, -} from '@pages/[language]/stories/[id]/[[...slugs]]'; +} from '~pages/[language]/stories/[id]/[[...slugs]]'; +import { Language, RecordingContentType } from '~src/__generated__/graphql'; + import { GetStoryDetailDataDocument, GetStoryDetailStaticPathsDocument, } from './__generated__/detail'; -import { Language, RecordingContentType } from '@src/__generated__/graphql'; const renderPage = buildStaticRenderer(Story, getStaticProps); diff --git a/src/containers/story/detail.tsx b/src/containers/story/detail.tsx index 0f4bd16c3..55a71767e 100644 --- a/src/containers/story/detail.tsx +++ b/src/containers/story/detail.tsx @@ -1,5 +1,6 @@ -import withFailStates from '@components/HOCs/withFailStates'; -import { Recording } from '@components/organisms/recording'; +import withFailStates from '~components/HOCs/withFailStates'; +import { Recording } from '~components/organisms/recording'; + import { GetStoryDetailDataQuery } from './__generated__/detail'; export interface StoryDetailProps { diff --git a/src/containers/testimonies.spec.tsx b/src/containers/testimonies.spec.tsx index 6a2c76faf..c3a7f472c 100644 --- a/src/containers/testimonies.spec.tsx +++ b/src/containers/testimonies.spec.tsx @@ -1,18 +1,19 @@ import { when } from 'jest-when'; import React from 'react'; -import { fetchApi } from '@lib/api/fetchApi'; -import { ENTRIES_PER_PAGE } from '@lib/constants'; -import renderWithProviders from '@lib/test/renderWithProviders'; +import { fetchApi } from '~lib/api/fetchApi'; +import { ENTRIES_PER_PAGE } from '~lib/constants'; +import renderWithProviders from '~lib/test/renderWithProviders'; import Testimonies, { getStaticPaths, getStaticProps, -} from '@pages/[language]/testimonies/page/[i]'; +} from '~pages/[language]/testimonies/page/[i]'; +import { Testimony } from '~src/__generated__/graphql'; + import { GetTestimoniesPageDataDocument, GetTestimoniesPathsDataDocument, } from './__generated__/testimonies'; -import { Testimony } from '@src/__generated__/graphql'; function loadTestimonies(nodes: Partial[] | null = null): void { when(fetchApi) diff --git a/src/containers/testimonies.tsx b/src/containers/testimonies.tsx index ee070a220..bebb88b9c 100644 --- a/src/containers/testimonies.tsx +++ b/src/containers/testimonies.tsx @@ -1,18 +1,17 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import Heading1 from '@components/atoms/heading1'; -import Button from '@components/molecules/button'; -import ContentWidthLimiter from '@components/molecules/contentWidthLimiter'; -import Pagination from '@components/molecules/pagination'; -import AboutNav from '@components/organisms/aboutNav'; +import Heading1 from '~components/atoms/heading1'; +import Button from '~components/molecules/button'; +import ContentWidthLimiter from '~components/molecules/contentWidthLimiter'; +import Pagination from '~components/molecules/pagination'; +import AboutNav from '~components/organisms/aboutNav'; +import { PaginatedProps } from '~lib/getPaginatedStaticProps'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; -import { PaginatedProps } from '@lib/getPaginatedStaticProps'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; - -import styles from './testimonies.module.scss'; import { GetTestimoniesPageDataQuery } from './__generated__/testimonies'; +import styles from './testimonies.module.scss'; export type TestimoniesProps = PaginatedProps< NonNullable[0], diff --git a/src/lib/__mocks__/getIntlMessages.ts b/src/lib/__mocks__/getIntlMessages.ts index 4030dc1e9..1f56324cc 100644 --- a/src/lib/__mocks__/getIntlMessages.ts +++ b/src/lib/__mocks__/getIntlMessages.ts @@ -1,7 +1,7 @@ import { act } from '@testing-library/react'; import { ResolvedIntlConfig } from 'react-intl'; -declare module '@lib/getIntlMessages' { +declare module '~lib/getIntlMessages' { export function __awaitIntlMessages(): Promise< ResolvedIntlConfig['messages'] >; diff --git a/src/lib/api/__generated__/bibleContent.ts b/src/lib/api/__generated__/bibleContent.ts index d3a98371c..df64f9dd2 100644 --- a/src/lib/api/__generated__/bibleContent.ts +++ b/src/lib/api/__generated__/bibleContent.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type GetBibleBookContentQueryVariables = Types.Exact<{ bibleId: Types.Scalars['ID']; bookId: Types.Scalars['ID']; @@ -35,7 +35,7 @@ export const useGetBibleBookContentQuery = < graphqlFetcher(GetBibleBookContentDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function getBibleBookContent( variables: ExactAlt diff --git a/src/lib/api/__generated__/collectionFavorite.ts b/src/lib/api/__generated__/collectionFavorite.ts index 295e952bf..addbb60a9 100644 --- a/src/lib/api/__generated__/collectionFavorite.ts +++ b/src/lib/api/__generated__/collectionFavorite.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type CollectionFavoriteMutationVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -26,7 +26,7 @@ export const useCollectionFavoriteMutation = < (variables?: CollectionFavoriteMutationVariables) => graphqlFetcher(CollectionFavoriteDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function collectionFavorite( variables: ExactAlt diff --git a/src/lib/api/__generated__/collectionIsFavorited.ts b/src/lib/api/__generated__/collectionIsFavorited.ts index d4376e1e4..bfc6e465d 100644 --- a/src/lib/api/__generated__/collectionIsFavorited.ts +++ b/src/lib/api/__generated__/collectionIsFavorited.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type CollectionIsFavoritedQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -30,7 +30,7 @@ export const useCollectionIsFavoritedQuery = < graphqlFetcher(CollectionIsFavoritedDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function collectionIsFavorited( variables: ExactAlt diff --git a/src/lib/api/__generated__/collectionUnfavorite.ts b/src/lib/api/__generated__/collectionUnfavorite.ts index ca01f45ab..f801408de 100644 --- a/src/lib/api/__generated__/collectionUnfavorite.ts +++ b/src/lib/api/__generated__/collectionUnfavorite.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type CollectionUnfavoriteMutationVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -26,7 +26,7 @@ export const useCollectionUnfavoriteMutation = < (variables?: CollectionUnfavoriteMutationVariables) => graphqlFetcher(CollectionUnfavoriteDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function collectionUnfavorite( variables: ExactAlt diff --git a/src/lib/api/__generated__/login.ts b/src/lib/api/__generated__/login.ts index 05be8ff14..293ffdd0c 100644 --- a/src/lib/api/__generated__/login.ts +++ b/src/lib/api/__generated__/login.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type LoginMutationVariables = Types.Exact<{ email: Types.Scalars['String']; password: Types.Scalars['String']; @@ -32,7 +32,7 @@ export const useLoginMutation = < (variables?: LoginMutationVariables) => graphqlFetcher(LoginDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function login( variables: ExactAlt diff --git a/src/lib/api/__generated__/personFavorite.ts b/src/lib/api/__generated__/personFavorite.ts index 690caab48..ba58ded68 100644 --- a/src/lib/api/__generated__/personFavorite.ts +++ b/src/lib/api/__generated__/personFavorite.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type PersonFavoriteMutationVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -26,7 +26,7 @@ export const usePersonFavoriteMutation = < (variables?: PersonFavoriteMutationVariables) => graphqlFetcher(PersonFavoriteDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function personFavorite( variables: ExactAlt diff --git a/src/lib/api/__generated__/personIsFavorited.ts b/src/lib/api/__generated__/personIsFavorited.ts index e50a2df44..c552634e1 100644 --- a/src/lib/api/__generated__/personIsFavorited.ts +++ b/src/lib/api/__generated__/personIsFavorited.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type PersonIsFavoritedQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -29,7 +29,7 @@ export const usePersonIsFavoritedQuery = < graphqlFetcher(PersonIsFavoritedDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function personIsFavorited( variables: ExactAlt diff --git a/src/lib/api/__generated__/personUnfavorite.ts b/src/lib/api/__generated__/personUnfavorite.ts index ecbeb43f7..277fc4cfb 100644 --- a/src/lib/api/__generated__/personUnfavorite.ts +++ b/src/lib/api/__generated__/personUnfavorite.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type PersonUnfavoriteMutationVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -26,7 +26,7 @@ export const usePersonUnfavoriteMutation = < (variables?: PersonUnfavoriteMutationVariables) => graphqlFetcher(PersonUnfavoriteDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function personUnfavorite( variables: ExactAlt diff --git a/src/lib/api/__generated__/recordingFavorite.ts b/src/lib/api/__generated__/recordingFavorite.ts index c2f0c3169..ba7bb444e 100644 --- a/src/lib/api/__generated__/recordingFavorite.ts +++ b/src/lib/api/__generated__/recordingFavorite.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type RecordingFavoriteMutationVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -26,7 +26,7 @@ export const useRecordingFavoriteMutation = < (variables?: RecordingFavoriteMutationVariables) => graphqlFetcher(RecordingFavoriteDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function recordingFavorite( variables: ExactAlt diff --git a/src/lib/api/__generated__/recordingIsFavorited.ts b/src/lib/api/__generated__/recordingIsFavorited.ts index 5d5c2c974..31e72ff27 100644 --- a/src/lib/api/__generated__/recordingIsFavorited.ts +++ b/src/lib/api/__generated__/recordingIsFavorited.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type RecordingIsFavoritedQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -29,7 +29,7 @@ export const useRecordingIsFavoritedQuery = < graphqlFetcher(RecordingIsFavoritedDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function recordingIsFavorited( variables: ExactAlt diff --git a/src/lib/api/__generated__/recordingUnfavorite.ts b/src/lib/api/__generated__/recordingUnfavorite.ts index 981fbe59c..e677d9829 100644 --- a/src/lib/api/__generated__/recordingUnfavorite.ts +++ b/src/lib/api/__generated__/recordingUnfavorite.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type RecordingUnfavoriteMutationVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -26,7 +26,7 @@ export const useRecordingUnfavoriteMutation = < (variables?: RecordingUnfavoriteMutationVariables) => graphqlFetcher(RecordingUnfavoriteDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function recordingUnfavorite( variables: ExactAlt diff --git a/src/lib/api/__generated__/sequenceFavorite.ts b/src/lib/api/__generated__/sequenceFavorite.ts index 58b5c5492..26c06f137 100644 --- a/src/lib/api/__generated__/sequenceFavorite.ts +++ b/src/lib/api/__generated__/sequenceFavorite.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type SequenceFavoriteMutationVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -26,7 +26,7 @@ export const useSequenceFavoriteMutation = < (variables?: SequenceFavoriteMutationVariables) => graphqlFetcher(SequenceFavoriteDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function sequenceFavorite( variables: ExactAlt diff --git a/src/lib/api/__generated__/sequenceIsFavorited.ts b/src/lib/api/__generated__/sequenceIsFavorited.ts index e7ca5c221..feb6354a7 100644 --- a/src/lib/api/__generated__/sequenceIsFavorited.ts +++ b/src/lib/api/__generated__/sequenceIsFavorited.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type SequenceIsFavoritedQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -35,7 +35,7 @@ export const useSequenceIsFavoritedQuery = < graphqlFetcher(SequenceIsFavoritedDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function sequenceIsFavorited( variables: ExactAlt diff --git a/src/lib/api/__generated__/sequenceUnfavorite.ts b/src/lib/api/__generated__/sequenceUnfavorite.ts index abb34c37e..20fc743f3 100644 --- a/src/lib/api/__generated__/sequenceUnfavorite.ts +++ b/src/lib/api/__generated__/sequenceUnfavorite.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type SequenceUnfavoriteMutationVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -26,7 +26,7 @@ export const useSequenceUnfavoriteMutation = < (variables?: SequenceUnfavoriteMutationVariables) => graphqlFetcher(SequenceUnfavoriteDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function sequenceUnfavorite( variables: ExactAlt diff --git a/src/lib/api/__generated__/sponsorFavorite.ts b/src/lib/api/__generated__/sponsorFavorite.ts index 9bbfa11c6..da4cdc9f0 100644 --- a/src/lib/api/__generated__/sponsorFavorite.ts +++ b/src/lib/api/__generated__/sponsorFavorite.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type SponsorFavoriteMutationVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -26,7 +26,7 @@ export const useSponsorFavoriteMutation = < (variables?: SponsorFavoriteMutationVariables) => graphqlFetcher(SponsorFavoriteDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function sponsorFavorite( variables: ExactAlt diff --git a/src/lib/api/__generated__/sponsorIsFavorited.ts b/src/lib/api/__generated__/sponsorIsFavorited.ts index b7b826640..b08aa72ae 100644 --- a/src/lib/api/__generated__/sponsorIsFavorited.ts +++ b/src/lib/api/__generated__/sponsorIsFavorited.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useQuery, UseQueryOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type SponsorIsFavoritedQueryVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -29,7 +29,7 @@ export const useSponsorIsFavoritedQuery = < graphqlFetcher(SponsorIsFavoritedDocument, variables), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function sponsorIsFavorited( variables: ExactAlt diff --git a/src/lib/api/__generated__/sponsorUnfavorite.ts b/src/lib/api/__generated__/sponsorUnfavorite.ts index ef841f7fe..0dc012f83 100644 --- a/src/lib/api/__generated__/sponsorUnfavorite.ts +++ b/src/lib/api/__generated__/sponsorUnfavorite.ts @@ -1,7 +1,7 @@ import * as Types from '../../../__generated__/graphql'; import { useMutation, UseMutationOptions } from 'react-query'; -import { graphqlFetcher } from '@lib/api/graphqlFetcher'; +import { graphqlFetcher } from '~lib/api/graphqlFetcher'; export type SponsorUnfavoriteMutationVariables = Types.Exact<{ id: Types.Scalars['ID']; }>; @@ -26,7 +26,7 @@ export const useSponsorUnfavoriteMutation = < (variables?: SponsorUnfavoriteMutationVariables) => graphqlFetcher(SponsorUnfavoriteDocument, variables)(), options ); -import { fetchApi } from '@lib/api/fetchApi' +import { fetchApi } from '~lib/api/fetchApi' export async function sponsorUnfavorite( variables: ExactAlt diff --git a/src/lib/api/fetchApi.spec.ts b/src/lib/api/fetchApi.spec.ts index fc64bca7f..d634d8e46 100644 --- a/src/lib/api/fetchApi.spec.ts +++ b/src/lib/api/fetchApi.spec.ts @@ -1,12 +1,12 @@ import set from 'lodash/set'; -import { fetchApi } from '@lib/api/fetchApi'; -import { storeRequest } from '@lib/api/storeRequest'; +import { fetchApi } from '~lib/api/fetchApi'; +import { storeRequest } from '~lib/api/storeRequest'; const noopQuery = 'query noop { noop { noop } }'; global.fetch = jest.fn(); -jest.unmock('@lib/api/fetchApi'); +jest.unmock('~lib/api/fetchApi'); const mockFetchResponse = () => { (global.fetch as jest.Mock).mockResolvedValue({ diff --git a/src/lib/api/fetchApi.ts b/src/lib/api/fetchApi.ts index 6fde8a59a..8216a61ed 100644 --- a/src/lib/api/fetchApi.ts +++ b/src/lib/api/fetchApi.ts @@ -1,6 +1,6 @@ -import { getCurrentRequest } from '@lib/api/storeRequest'; -import { getSessionToken } from '@lib/cookies'; -import { sleep } from '@lib/sleep'; +import { getCurrentRequest } from '~lib/api/storeRequest'; +import { getSessionToken } from '~lib/cookies'; +import { sleep } from '~lib/sleep'; const API_URL = process.env.NEXT_PUBLIC_API_URL || diff --git a/src/lib/api/graphqlFetcher.ts b/src/lib/api/graphqlFetcher.ts index 22acd4ba6..0b89c8f50 100644 --- a/src/lib/api/graphqlFetcher.ts +++ b/src/lib/api/graphqlFetcher.ts @@ -1,4 +1,4 @@ -import { fetchApi } from '@lib/api/fetchApi'; +import { fetchApi } from '~lib/api/fetchApi'; export function graphqlFetcher< TData, diff --git a/src/lib/api/login.ts b/src/lib/api/login.ts index 4c9e69e3d..776085a74 100644 --- a/src/lib/api/login.ts +++ b/src/lib/api/login.ts @@ -1,6 +1,8 @@ import { QueryClient } from 'react-query'; + +import { setSessionToken } from '~lib/cookies'; + import { login as _login } from './__generated__/login'; -import { setSessionToken } from '@lib/cookies'; export const USER_SESSION_QUERY_KEYS = [ ['getWithAuthGuardData'], diff --git a/src/lib/api/personIsFavorited.ts b/src/lib/api/personIsFavorited.ts index 960ddfd8b..c724a4719 100644 --- a/src/lib/api/personIsFavorited.ts +++ b/src/lib/api/personIsFavorited.ts @@ -1,5 +1,6 @@ +import { Scalars } from '~src/__generated__/graphql'; + import { personIsFavorited as _personIsFavorited } from './__generated__/personIsFavorited'; -import { Scalars } from '@src/__generated__/graphql'; export function personIsFavorited(id: Scalars['ID']): Promise { return _personIsFavorited({ id }).then( diff --git a/src/lib/api/recordingIsFavorited.ts b/src/lib/api/recordingIsFavorited.ts index c052437fa..cf8ea07cf 100644 --- a/src/lib/api/recordingIsFavorited.ts +++ b/src/lib/api/recordingIsFavorited.ts @@ -1,5 +1,6 @@ +import { Scalars } from '~src/__generated__/graphql'; + import { recordingIsFavorited as _recordingIsFavorited } from './__generated__/recordingIsFavorited'; -import { Scalars } from '@src/__generated__/graphql'; export function recordingIsFavorited(id: Scalars['ID']): Promise { return _recordingIsFavorited({ id }).then( diff --git a/src/lib/api/setPlaylistMembership.ts b/src/lib/api/setPlaylistMembership.ts index 27cf4e74b..6aa7f5864 100644 --- a/src/lib/api/setPlaylistMembership.ts +++ b/src/lib/api/setPlaylistMembership.ts @@ -1,5 +1,5 @@ -import { fetchApi } from '@lib/api/fetchApi'; -import { Scalars } from '@src/__generated__/graphql'; +import { fetchApi } from '~lib/api/fetchApi'; +import { Scalars } from '~src/__generated__/graphql'; const mutationAdd = ` mutation($recordingId: ID!, $playlistId: ID!) { diff --git a/src/lib/api/sponsorIsFavorited.ts b/src/lib/api/sponsorIsFavorited.ts index d1b1958f0..d304cf4b3 100644 --- a/src/lib/api/sponsorIsFavorited.ts +++ b/src/lib/api/sponsorIsFavorited.ts @@ -1,5 +1,6 @@ +import { Scalars } from '~src/__generated__/graphql'; + import { sponsorIsFavorited as _sponsorIsFavorited } from './__generated__/sponsorIsFavorited'; -import { Scalars } from '@src/__generated__/graphql'; export function sponsorIsFavorited(id: Scalars['ID']): Promise { return _sponsorIsFavorited({ id }).then( diff --git a/src/lib/api/useIsCollectionFavorited.ts b/src/lib/api/useIsCollectionFavorited.ts index e79b9b3e5..e1f79bf16 100644 --- a/src/lib/api/useIsCollectionFavorited.ts +++ b/src/lib/api/useIsCollectionFavorited.ts @@ -1,14 +1,14 @@ import { useQueryClient } from 'react-query'; -import { setCollectionFavorited } from '@lib/api/setCollectionFavorited'; -import { getSessionToken } from '@lib/cookies'; +import { setCollectionFavorited } from '~lib/api/setCollectionFavorited'; +import { getSessionToken } from '~lib/cookies'; +import { Scalars } from '~src/__generated__/graphql'; -import { IUseIsFavoritedResult, useIsFavorited } from './useIsFavorited'; -import { Scalars } from '@src/__generated__/graphql'; import { CollectionIsFavoritedQuery, useCollectionIsFavoritedQuery, } from './__generated__/collectionIsFavorited'; +import { IUseIsFavoritedResult, useIsFavorited } from './useIsFavorited'; interface IUseIsCollectionFavoritedResult extends IUseIsFavoritedResult { playbackCompletedPercentage: number; diff --git a/src/lib/api/useIsFavorited.ts b/src/lib/api/useIsFavorited.ts index 4b4a53af4..b83d0bb36 100644 --- a/src/lib/api/useIsFavorited.ts +++ b/src/lib/api/useIsFavorited.ts @@ -7,8 +7,8 @@ import { useQueryClient, } from 'react-query'; -import { GlobalModalsContext } from '@components/templates/andGlobalModals'; -import { getSessionToken } from '@lib/cookies'; +import { GlobalModalsContext } from '~components/templates/andGlobalModals'; +import { getSessionToken } from '~lib/cookies'; export type IUseIsFavoritedResult = { isFavorited: boolean | undefined; diff --git a/src/lib/api/useIsPersonFavorited.ts b/src/lib/api/useIsPersonFavorited.ts index f1fdca6b7..3d8b72c97 100644 --- a/src/lib/api/useIsPersonFavorited.ts +++ b/src/lib/api/useIsPersonFavorited.ts @@ -1,8 +1,8 @@ -import { setPersonFavorited } from '@lib/api/setPersonFavorited'; +import { setPersonFavorited } from '~lib/api/setPersonFavorited'; +import { Scalars } from '~src/__generated__/graphql'; import { personIsFavorited } from './personIsFavorited'; import { IUseIsFavoritedResult, useIsFavorited } from './useIsFavorited'; -import { Scalars } from '@src/__generated__/graphql'; export function useIsPersonFavorited(id: Scalars['ID']): IUseIsFavoritedResult { return useIsFavorited( diff --git a/src/lib/api/useIsRecordingFavorited.ts b/src/lib/api/useIsRecordingFavorited.ts index 667994e1f..687d5acca 100644 --- a/src/lib/api/useIsRecordingFavorited.ts +++ b/src/lib/api/useIsRecordingFavorited.ts @@ -1,10 +1,10 @@ import { useQueryClient } from 'react-query'; -import { setRecordingFavorited } from '@lib/api/setRecordingFavorited'; +import { setRecordingFavorited } from '~lib/api/setRecordingFavorited'; +import { Scalars } from '~src/__generated__/graphql'; import { recordingIsFavorited } from './recordingIsFavorited'; import { IUseIsFavoritedResult, useIsFavorited } from './useIsFavorited'; -import { Scalars } from '@src/__generated__/graphql'; export const RECORDING_FAVORITED_QUERY_KEY_PREFIX = 'isRecordingFavorited'; diff --git a/src/lib/api/useIsSequenceFavorited.ts b/src/lib/api/useIsSequenceFavorited.ts index 88c28041c..5d3afa8d8 100644 --- a/src/lib/api/useIsSequenceFavorited.ts +++ b/src/lib/api/useIsSequenceFavorited.ts @@ -1,15 +1,15 @@ import { useQueryClient } from 'react-query'; -import { setSequenceFavorited } from '@lib/api/setSequenceFavorited'; -import { getSessionToken } from '@lib/cookies'; +import { setSequenceFavorited } from '~lib/api/setSequenceFavorited'; +import { getSessionToken } from '~lib/cookies'; +import { Scalars } from '~src/__generated__/graphql'; -import { IUseIsFavoritedResult, useIsFavorited } from './useIsFavorited'; -import { RECORDING_FAVORITED_QUERY_KEY_PREFIX } from './useIsRecordingFavorited'; -import { Scalars } from '@src/__generated__/graphql'; import { SequenceIsFavoritedQuery, useSequenceIsFavoritedQuery, } from './__generated__/sequenceIsFavorited'; +import { IUseIsFavoritedResult, useIsFavorited } from './useIsFavorited'; +import { RECORDING_FAVORITED_QUERY_KEY_PREFIX } from './useIsRecordingFavorited'; interface IUseIsSequenceFavoritedResult extends IUseIsFavoritedResult { recordingsFavoritedCount: number | undefined; diff --git a/src/lib/api/useIsSponsorFavorited.ts b/src/lib/api/useIsSponsorFavorited.ts index 3739382b8..051c8c3e5 100644 --- a/src/lib/api/useIsSponsorFavorited.ts +++ b/src/lib/api/useIsSponsorFavorited.ts @@ -1,8 +1,8 @@ -import { setSponsorFavorited } from '@lib/api/setSponsorFavorited'; +import { setSponsorFavorited } from '~lib/api/setSponsorFavorited'; +import { Scalars } from '~src/__generated__/graphql'; import { sponsorIsFavorited } from './sponsorIsFavorited'; import { IUseIsFavoritedResult, useIsFavorited } from './useIsFavorited'; -import { Scalars } from '@src/__generated__/graphql'; export function useIsSponsorFavorited( id: Scalars['ID'] diff --git a/src/lib/api/useLogout.spec.tsx b/src/lib/api/useLogout.spec.tsx index 962081080..4455d1beb 100644 --- a/src/lib/api/useLogout.spec.tsx +++ b/src/lib/api/useLogout.spec.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { useLogout } from '@lib/api/useLogout'; -import renderWithProviders from '@lib/test/renderWithProviders'; +import { useLogout } from '~lib/api/useLogout'; +import renderWithProviders from '~lib/test/renderWithProviders'; const mockBeacon = jest.fn(); diff --git a/src/lib/api/useLogout.ts b/src/lib/api/useLogout.ts index ac779eadf..0d61d9e95 100644 --- a/src/lib/api/useLogout.ts +++ b/src/lib/api/useLogout.ts @@ -1,7 +1,7 @@ import { useQueryClient } from 'react-query'; -import { clearSessionToken } from '@lib/cookies'; -import isServerSide from '@lib/isServerSide'; +import { clearSessionToken } from '~lib/cookies'; +import isServerSide from '~lib/isServerSide'; import { resetUserQueries } from './login'; diff --git a/src/lib/api/useSetPlaylistMembership.ts b/src/lib/api/useSetPlaylistMembership.ts index 3add9577e..d418ad4c1 100644 --- a/src/lib/api/useSetPlaylistMembership.ts +++ b/src/lib/api/useSetPlaylistMembership.ts @@ -1,7 +1,7 @@ import { QueryKey, useMutation, useQueryClient } from 'react-query'; -import { setPlaylistMembership } from '@lib/api/setPlaylistMembership'; -import { Scalars } from '@src/__generated__/graphql'; +import { setPlaylistMembership } from '~lib/api/setPlaylistMembership'; +import { Scalars } from '~src/__generated__/graphql'; interface MutateVariables { recordingId: Scalars['ID']; diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 5e2c3aef9..48c73a467 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -1,4 +1,4 @@ -import { Language } from '@src/__generated__/graphql'; +import { Language } from '~src/__generated__/graphql'; export const ENTRIES_PER_PAGE = 12; diff --git a/src/lib/cookies.ts b/src/lib/cookies.ts index 0076b2a8d..ca759b19b 100644 --- a/src/lib/cookies.ts +++ b/src/lib/cookies.ts @@ -1,6 +1,5 @@ -import { IncomingMessage } from 'http'; - import cookie from 'cookie'; +import { IncomingMessage } from 'http'; import JSCookie from 'js-cookie'; const SESSION_KEY = 'avSession'; diff --git a/src/lib/generateFeed.spec.ts b/src/lib/generateFeed.spec.ts index e3235f58a..3b15705af 100644 --- a/src/lib/generateFeed.spec.ts +++ b/src/lib/generateFeed.spec.ts @@ -1,7 +1,8 @@ import { advanceTo } from 'jest-date-mock'; +import { RecordingContentType } from '~src/__generated__/graphql'; + import { generateFeed } from './generateFeed'; -import { RecordingContentType } from '@src/__generated__/graphql'; describe('generateFeed', () => { beforeAll(() => { diff --git a/src/lib/generateFeed.ts b/src/lib/generateFeed.ts index ac31b6a3e..941d83c3a 100644 --- a/src/lib/generateFeed.ts +++ b/src/lib/generateFeed.ts @@ -6,9 +6,10 @@ import he from 'he'; import { GetServerSidePropsContext } from 'next'; import striptags from 'striptags'; -import getIntl from './getIntl'; -import { RecordingContentType } from '@src/__generated__/graphql'; +import { RecordingContentType } from '~src/__generated__/graphql'; + import { GenerateFeedFragment } from './__generated__/generateFeed'; +import getIntl from './getIntl'; export const sendRSSHeaders = (res: GetServerSidePropsContext['res']) => { res.setHeader('Content-Type', 'text/xml'); diff --git a/src/lib/getAppFeatures.tsx b/src/lib/getAppFeatures.tsx index 43b1d8cbe..07df0870e 100644 --- a/src/lib/getAppFeatures.tsx +++ b/src/lib/getAppFeatures.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import root from '@lib/routes'; +import root from '~lib/routes'; export type IAppFeature = { heading: JSX.Element; diff --git a/src/lib/getDehydratedProps.ts b/src/lib/getDehydratedProps.ts index 8bb6470f7..d36b689f7 100644 --- a/src/lib/getDehydratedProps.ts +++ b/src/lib/getDehydratedProps.ts @@ -1,6 +1,5 @@ import { GetServerSidePropsResult } from 'next'; -import { QueryClient } from 'react-query'; -import { dehydrate, DehydratedState } from 'react-query'; +import { dehydrate,DehydratedState,QueryClient } from 'react-query'; export type DehydratedProps> = GetServerSidePropsResult< diff --git a/src/lib/getDetailStaticPaths.tsx b/src/lib/getDetailStaticPaths.tsx index 831d55f7c..0c4679748 100644 --- a/src/lib/getDetailStaticPaths.tsx +++ b/src/lib/getDetailStaticPaths.tsx @@ -4,8 +4,8 @@ import { DETAIL_PRERENDER_LIMIT, LANGUAGES, SupportedLanguages, -} from '@lib/constants'; -import { Language } from '@src/__generated__/graphql'; +} from '~lib/constants'; +import { Language } from '~src/__generated__/graphql'; type Getter = (variables: { language: SupportedLanguages; diff --git a/src/lib/getIntl.ts b/src/lib/getIntl.ts index c6f75bf6d..812bc3026 100644 --- a/src/lib/getIntl.ts +++ b/src/lib/getIntl.ts @@ -1,8 +1,8 @@ import { createIntl, IntlShape } from 'react-intl'; -import getIntlMessages from '@lib/getIntlMessages'; -import getLanguageByBaseUrl from '@lib/getLanguageByBaseUrl'; -import handleIntlError from '@lib/handleIntlError'; +import getIntlMessages from '~lib/getIntlMessages'; +import getLanguageByBaseUrl from '~lib/getLanguageByBaseUrl'; +import handleIntlError from '~lib/handleIntlError'; export default async function getIntl( languageRoute: string diff --git a/src/lib/getIntlMessages.spec.ts b/src/lib/getIntlMessages.spec.ts index 7f5523be6..cecc268e1 100644 --- a/src/lib/getIntlMessages.spec.ts +++ b/src/lib/getIntlMessages.spec.ts @@ -1,7 +1,7 @@ import values from 'lodash/values'; -import { LANGUAGES } from '@lib/constants'; -import getIntlMessages from '@lib/getIntlMessages'; +import { LANGUAGES } from '~lib/constants'; +import getIntlMessages from '~lib/getIntlMessages'; describe('getIntlMessages', () => { it('handles all base urls', async () => { diff --git a/src/lib/getIntlMessages.ts b/src/lib/getIntlMessages.ts index fb8d86833..e3c3ffd49 100644 --- a/src/lib/getIntlMessages.ts +++ b/src/lib/getIntlMessages.ts @@ -1,6 +1,6 @@ import { ResolvedIntlConfig } from 'react-intl'; -import getLanguageByBaseUrl from '@lib/getLanguageByBaseUrl'; +import getLanguageByBaseUrl from '~lib/getLanguageByBaseUrl'; export default function getIntlMessages( languageRoute: string diff --git a/src/lib/getLangaugeIdByRoute.spec.ts b/src/lib/getLangaugeIdByRoute.spec.ts index 48733b54b..97c276e4a 100644 --- a/src/lib/getLangaugeIdByRoute.spec.ts +++ b/src/lib/getLangaugeIdByRoute.spec.ts @@ -1,4 +1,5 @@ -import { Language } from '@src/__generated__/graphql'; +import { Language } from '~src/__generated__/graphql'; + import { getLanguageIdByRoute } from './getLanguageIdByRoute'; describe('getLanguageIdByRoute', () => { diff --git a/src/lib/getLanguageByBaseUrl.ts b/src/lib/getLanguageByBaseUrl.ts index 165f0a182..b6cfaf4b0 100644 --- a/src/lib/getLanguageByBaseUrl.ts +++ b/src/lib/getLanguageByBaseUrl.ts @@ -1,4 +1,4 @@ -import { LanguageConfiguration, LANGUAGES } from '@lib/constants'; +import { LanguageConfiguration, LANGUAGES } from '~lib/constants'; export default function getLanguageByBaseUrl( base_url: string, diff --git a/src/lib/getLanguageDisplayNames.ts b/src/lib/getLanguageDisplayNames.ts index e8a7598d8..bf899e712 100644 --- a/src/lib/getLanguageDisplayNames.ts +++ b/src/lib/getLanguageDisplayNames.ts @@ -1,4 +1,4 @@ -import { LANGUAGES } from '@lib/constants'; +import { LANGUAGES } from '~lib/constants'; import getLanguageIds from './getLanguageIds'; diff --git a/src/lib/getLanguageIdByRoute.ts b/src/lib/getLanguageIdByRoute.ts index 1041acefa..76d3e5211 100644 --- a/src/lib/getLanguageIdByRoute.ts +++ b/src/lib/getLanguageIdByRoute.ts @@ -1,5 +1,5 @@ -import { LANGUAGES, SupportedLanguages } from '@lib/constants'; -import { Language } from '@src/__generated__/graphql'; +import { LANGUAGES, SupportedLanguages } from '~lib/constants'; +import { Language } from '~src/__generated__/graphql'; export function getLanguageIdByRoute( route: string | undefined, diff --git a/src/lib/getLanguageIdByRouteOrLegacyRoute.ts b/src/lib/getLanguageIdByRouteOrLegacyRoute.ts index cfaf532b3..e16632b61 100644 --- a/src/lib/getLanguageIdByRouteOrLegacyRoute.ts +++ b/src/lib/getLanguageIdByRouteOrLegacyRoute.ts @@ -1,4 +1,4 @@ -import { LANGUAGES, SupportedLanguages } from '@lib/constants'; +import { LANGUAGES, SupportedLanguages } from '~lib/constants'; export function getLanguageIdByRouteOrLegacyRoute( route: string | undefined diff --git a/src/lib/getLanguageIds.ts b/src/lib/getLanguageIds.ts index a92970ad3..dae6f202b 100644 --- a/src/lib/getLanguageIds.ts +++ b/src/lib/getLanguageIds.ts @@ -1,4 +1,4 @@ -import { LANGUAGES, SupportedLanguages } from '@lib/constants'; +import { LANGUAGES, SupportedLanguages } from '~lib/constants'; export default function getLanguageIds(): SupportedLanguages[] { return Object.keys(LANGUAGES) as SupportedLanguages[]; diff --git a/src/lib/getLanguageRoutes.ts b/src/lib/getLanguageRoutes.ts index 214e645c7..c326a7c8f 100644 --- a/src/lib/getLanguageRoutes.ts +++ b/src/lib/getLanguageRoutes.ts @@ -1,4 +1,4 @@ -import { LANGUAGES } from '@lib/constants'; +import { LANGUAGES } from '~lib/constants'; import getLanguageIds from './getLanguageIds'; diff --git a/src/lib/getNumberedStaticPaths.spec.ts b/src/lib/getNumberedStaticPaths.spec.ts index 884b5a258..b4b87f202 100644 --- a/src/lib/getNumberedStaticPaths.spec.ts +++ b/src/lib/getNumberedStaticPaths.spec.ts @@ -2,8 +2,8 @@ import { ENTRIES_PER_PAGE, LANGUAGES, LIST_PRERENDER_LIMIT, -} from '@lib/constants'; -import { getNumberedStaticPaths } from '@lib/getNumberedStaticPaths'; +} from '~lib/constants'; +import { getNumberedStaticPaths } from '~lib/getNumberedStaticPaths'; describe('getNumberedStaticPaths', () => { it('enforces list render limit', async () => { diff --git a/src/lib/getNumberedStaticPaths.ts b/src/lib/getNumberedStaticPaths.ts index bcd8a8435..d3b73b07a 100644 --- a/src/lib/getNumberedStaticPaths.ts +++ b/src/lib/getNumberedStaticPaths.ts @@ -5,10 +5,9 @@ import { LANGUAGES, LIST_PRERENDER_LIMIT, SupportedLanguages, -} from '@lib/constants'; - -import getLanguageIds from '@lib/getLanguageIds'; -import { Language } from '@src/__generated__/graphql'; +} from '~lib/constants'; +import getLanguageIds from '~lib/getLanguageIds'; +import { Language } from '~src/__generated__/graphql'; type Getter = (variables: { language: Language }) => Promise; type Parser = (data: T) => number | null | undefined; diff --git a/src/lib/getPageOffset.ts b/src/lib/getPageOffset.ts index 79fe4c277..258c5cc0f 100644 --- a/src/lib/getPageOffset.ts +++ b/src/lib/getPageOffset.ts @@ -1,4 +1,4 @@ -import { ENTRIES_PER_PAGE } from '@lib/constants'; +import { ENTRIES_PER_PAGE } from '~lib/constants'; export default function getPageOffset(page: number | string): number { return (+page - 1) * ENTRIES_PER_PAGE; diff --git a/src/lib/getPaginatedData.ts b/src/lib/getPaginatedData.ts index 0b87f6f90..00693b86d 100644 --- a/src/lib/getPaginatedData.ts +++ b/src/lib/getPaginatedData.ts @@ -1,5 +1,5 @@ -import { ENTRIES_PER_PAGE } from '@lib/constants'; -import getPageOffset from '@lib/getPageOffset'; +import { ENTRIES_PER_PAGE } from '~lib/constants'; +import getPageOffset from '~lib/getPageOffset'; export interface PaginatedGetter { (variables: { offset: number; first: number } & E): Promise; diff --git a/src/lib/getPaginatedStaticProps.spec.ts b/src/lib/getPaginatedStaticProps.spec.ts index 7629f92e3..22f16e15c 100644 --- a/src/lib/getPaginatedStaticProps.spec.ts +++ b/src/lib/getPaginatedStaticProps.spec.ts @@ -1,4 +1,4 @@ -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; describe('getPaginatedStaticProps', () => { it('defaults nodes to empty array', async () => { diff --git a/src/lib/getPaginatedStaticProps.ts b/src/lib/getPaginatedStaticProps.ts index d8bb0b25d..832cce608 100644 --- a/src/lib/getPaginatedStaticProps.ts +++ b/src/lib/getPaginatedStaticProps.ts @@ -1,10 +1,9 @@ -import { IBaseProps } from '@containers/base'; -import { LANGUAGES, REVALIDATE } from '@lib/constants'; - -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getPaginatedData, PaginatedGetter } from '@lib/getPaginatedData'; -import getPaginationPageCount from '@lib/getPaginationPageCount'; -import { Language } from '@src/__generated__/graphql'; +import { IBaseProps } from '~containers/base'; +import { LANGUAGES, REVALIDATE } from '~lib/constants'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getPaginatedData, PaginatedGetter } from '~lib/getPaginatedData'; +import getPaginationPageCount from '~lib/getPaginationPageCount'; +import { Language } from '~src/__generated__/graphql'; export interface PaginationData { total: number; diff --git a/src/lib/getPaginationPageCount.ts b/src/lib/getPaginationPageCount.ts index b9d84e226..527d03ea3 100644 --- a/src/lib/getPaginationPageCount.ts +++ b/src/lib/getPaginationPageCount.ts @@ -1,4 +1,4 @@ -import { ENTRIES_PER_PAGE } from '@lib/constants'; +import { ENTRIES_PER_PAGE } from '~lib/constants'; export default function getPaginationPageCount(totalNodes: number): number { return Math.ceil(totalNodes / ENTRIES_PER_PAGE); diff --git a/src/lib/getRecordingTheme.ts b/src/lib/getRecordingTheme.ts index da9532d71..d9dc598a1 100644 --- a/src/lib/getRecordingTheme.ts +++ b/src/lib/getRecordingTheme.ts @@ -1,7 +1,7 @@ -import { CardTheme } from '@components/molecules/card/base/withCardTheme'; +import { CardTheme } from '~components/molecules/card/base/withCardTheme'; +import { RecordingContentType } from '~src/__generated__/graphql'; import { BaseColors } from './constants'; -import { RecordingContentType } from '@src/__generated__/graphql'; type ISequenceTypeTheme = { accentColor: BaseColors.RED | BaseColors.SALMON; diff --git a/src/lib/getSequenceType.tsx b/src/lib/getSequenceType.tsx index e6cd50d83..8ec522ec9 100644 --- a/src/lib/getSequenceType.tsx +++ b/src/lib/getSequenceType.tsx @@ -1,14 +1,14 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { SequenceContentType } from '~src/__generated__/graphql'; + import BibleIcon from '../../public/img/icons/fa-bible.svg'; import AudiobookIcon from '../../public/img/icons/fa-book-light.svg'; import StoryIcon from '../../public/img/icons/fa-feather-light.svg'; import ListIcon from '../../public/img/icons/fa-list-alt.svg'; import SongIcon from '../../public/img/icons/fa-music-light.svg'; - import { BaseColors } from './constants'; -import { SequenceContentType } from '@src/__generated__/graphql'; type ISequenceTypeTheme = { backgroundColor: diff --git a/src/lib/getValidLanguage.ts b/src/lib/getValidLanguage.ts index c7e1642d2..10ad80eb7 100644 --- a/src/lib/getValidLanguage.ts +++ b/src/lib/getValidLanguage.ts @@ -1,4 +1,5 @@ -import { Language } from '@src/__generated__/graphql'; +import { Language } from '~src/__generated__/graphql'; + import { LANGUAGES } from './constants'; const isLangKey = (key: string): key is Language => { diff --git a/src/lib/hasVideo.ts b/src/lib/hasVideo.ts index 37c9972c8..064c4621d 100644 --- a/src/lib/hasVideo.ts +++ b/src/lib/hasVideo.ts @@ -1,4 +1,4 @@ -import { RecordingFragment } from '@components/organisms/__generated__/recording'; +import { RecordingFragment } from '~components/organisms/__generated__/recording'; export default function hasVideo( recording: Pick diff --git a/src/lib/hooks/useOnScreen.ts b/src/lib/hooks/useOnScreen.ts index 7c98b09b2..04adc385b 100644 --- a/src/lib/hooks/useOnScreen.ts +++ b/src/lib/hooks/useOnScreen.ts @@ -1,5 +1,6 @@ import { RefObject, useEffect, useMemo, useState } from 'react'; -import isServerSide from '@lib/isServerSide'; + +import isServerSide from '~lib/isServerSide'; export default function useOnScreen(ref: RefObject): boolean { const [isIntersecting, setIntersecting] = useState(false); diff --git a/src/lib/routes/bibles.ts b/src/lib/routes/bibles.ts index 707ce0ebf..fe96845e5 100644 --- a/src/lib/routes/bibles.ts +++ b/src/lib/routes/bibles.ts @@ -1,4 +1,5 @@ -import { Scalars } from '@src/__generated__/graphql'; +import { Scalars } from '~src/__generated__/graphql'; + import node from './primatives/node'; const bibles = (r: string) => ({ diff --git a/src/lib/routes/books.ts b/src/lib/routes/books.ts index 43c20942c..602aa4c50 100644 --- a/src/lib/routes/books.ts +++ b/src/lib/routes/books.ts @@ -1,4 +1,5 @@ -import { Scalars } from '@src/__generated__/graphql'; +import { Scalars } from '~src/__generated__/graphql'; + import node from './primatives/node'; const books = (r: string) => ({ diff --git a/src/lib/routes/conferences.ts b/src/lib/routes/conferences.ts index 314b5500e..450c9f5e5 100644 --- a/src/lib/routes/conferences.ts +++ b/src/lib/routes/conferences.ts @@ -1,4 +1,5 @@ -import { Scalars } from '@src/__generated__/graphql'; +import { Scalars } from '~src/__generated__/graphql'; + import node from './primatives/node'; import paginatedNode from './primatives/paginatedNode'; diff --git a/src/lib/routes/index.ts b/src/lib/routes/index.ts index bf1017f2e..79417d937 100644 --- a/src/lib/routes/index.ts +++ b/src/lib/routes/index.ts @@ -1,21 +1,21 @@ import about from './about'; import account from './account'; +import bibles from './bibles'; +import books from './books'; +import conferences from './conferences'; +import contact from './contact'; import discover from './discover'; +import library from './library'; import presenters from './presenters'; import node from './primatives/node'; import paginatedNode from './primatives/paginatedNode'; import releases from './releases'; import search from './search'; -import library from './library'; -import contact from './contact'; -import sponsors from './sponsors'; -import conferences from './conferences'; +import series from './series'; import songs from './songs'; +import sponsors from './sponsors'; import stories from './stories'; -import books from './books'; -import bibles from './bibles'; import teachings from './teachings'; -import series from './series'; const namespaces = (r: string) => ({ about: node(`${r}/about`, about), diff --git a/src/lib/routes/library.ts b/src/lib/routes/library.ts index 11865c4f7..e88ad28f6 100644 --- a/src/lib/routes/library.ts +++ b/src/lib/routes/library.ts @@ -1,4 +1,5 @@ -import { Scalars } from '@src/__generated__/graphql'; +import { Scalars } from '~src/__generated__/graphql'; + import node from './primatives/node'; const library = (r: string) => ({ diff --git a/src/lib/routes/presenters.ts b/src/lib/routes/presenters.ts index 78ab39bd9..b643f2f54 100644 --- a/src/lib/routes/presenters.ts +++ b/src/lib/routes/presenters.ts @@ -1,4 +1,5 @@ -import { Scalars } from '@src/__generated__/graphql'; +import { Scalars } from '~src/__generated__/graphql'; + import node from './primatives/node'; import paginatedNode from './primatives/paginatedNode'; diff --git a/src/lib/routes/releases.ts b/src/lib/routes/releases.ts index 9def5a7ee..5962e414f 100644 --- a/src/lib/routes/releases.ts +++ b/src/lib/routes/releases.ts @@ -1,4 +1,5 @@ -import { Scalars } from '@src/__generated__/graphql'; +import { Scalars } from '~src/__generated__/graphql'; + import node from './primatives/node'; const releases = (r: string) => ({ diff --git a/src/lib/routes/series.ts b/src/lib/routes/series.ts index 28a8e66f1..c184b866c 100644 --- a/src/lib/routes/series.ts +++ b/src/lib/routes/series.ts @@ -1,4 +1,5 @@ -import { Scalars } from '@src/__generated__/graphql'; +import { Scalars } from '~src/__generated__/graphql'; + import node from './primatives/node'; const series = (r: string) => ({ diff --git a/src/lib/routes/songs.ts b/src/lib/routes/songs.ts index 7a2f1a86c..e88f7877f 100644 --- a/src/lib/routes/songs.ts +++ b/src/lib/routes/songs.ts @@ -1,4 +1,5 @@ -import { Scalars } from '@src/__generated__/graphql'; +import { Scalars } from '~src/__generated__/graphql'; + import node from './primatives/node'; import slug from './primatives/slug'; diff --git a/src/lib/routes/sponsors.ts b/src/lib/routes/sponsors.ts index 5bf3d884f..621754152 100644 --- a/src/lib/routes/sponsors.ts +++ b/src/lib/routes/sponsors.ts @@ -1,4 +1,5 @@ -import { Scalars } from '@src/__generated__/graphql'; +import { Scalars } from '~src/__generated__/graphql'; + import node from './primatives/node'; import paginatedNode from './primatives/paginatedNode'; diff --git a/src/lib/routes/stories.ts b/src/lib/routes/stories.ts index 12c550d0a..8ff007ac0 100644 --- a/src/lib/routes/stories.ts +++ b/src/lib/routes/stories.ts @@ -1,4 +1,5 @@ -import { Scalars } from '@src/__generated__/graphql'; +import { Scalars } from '~src/__generated__/graphql'; + import node from './primatives/node'; import paginatedNode from './primatives/paginatedNode'; diff --git a/src/lib/test/buildLoader.ts b/src/lib/test/buildLoader.ts index 79d52398a..1b25f7300 100644 --- a/src/lib/test/buildLoader.ts +++ b/src/lib/test/buildLoader.ts @@ -2,7 +2,7 @@ import { when } from 'jest-when'; import defaultsDeep from 'lodash/defaultsDeep'; import { PartialDeep } from 'type-fest'; -import { fetchApi } from '@lib/api/fetchApi'; +import { fetchApi } from '~lib/api/fetchApi'; type Options = { useDefaults?: boolean; diff --git a/src/lib/test/buildRenderer.tsx b/src/lib/test/buildRenderer.tsx index 452ad680c..f7875964e 100644 --- a/src/lib/test/buildRenderer.tsx +++ b/src/lib/test/buildRenderer.tsx @@ -3,7 +3,7 @@ import { __mockedRouter, NextRouter } from 'next/router'; import React, { ComponentType } from 'react'; import { QueryClient } from 'react-query'; -import renderWithProviders from '@lib/test/renderWithProviders'; +import renderWithProviders from '~lib/test/renderWithProviders'; // TODO: Only accept props if getProps not provided // TODO: Only accept params if getProps provided diff --git a/src/lib/test/buildServerRenderer.ts b/src/lib/test/buildServerRenderer.ts index 2320a76f8..02773456c 100644 --- a/src/lib/test/buildServerRenderer.ts +++ b/src/lib/test/buildServerRenderer.ts @@ -1,7 +1,7 @@ import { GetServerSidePropsResult } from 'next'; import { ComponentType } from 'react'; -import { buildRenderer, Renderer } from '@lib/test/buildRenderer'; +import { buildRenderer, Renderer } from '~lib/test/buildRenderer'; export function buildServerRenderer< C extends ComponentType, diff --git a/src/lib/test/buildStaticRenderer.ts b/src/lib/test/buildStaticRenderer.ts index b0e610703..07488a199 100644 --- a/src/lib/test/buildStaticRenderer.ts +++ b/src/lib/test/buildStaticRenderer.ts @@ -1,7 +1,7 @@ import { GetStaticProps } from 'next'; import { ComponentType } from 'react'; -import { buildRenderer, Renderer } from '@lib/test/buildRenderer'; +import { buildRenderer, Renderer } from '~lib/test/buildRenderer'; export function buildStaticRenderer< C extends ComponentType, diff --git a/src/lib/test/loadAuthGuardData.ts b/src/lib/test/loadAuthGuardData.ts index 264dea085..1753d171e 100644 --- a/src/lib/test/loadAuthGuardData.ts +++ b/src/lib/test/loadAuthGuardData.ts @@ -1,8 +1,8 @@ import { when } from 'jest-when'; import Cookie from 'js-cookie'; -import { fetchApi } from '@lib/api/fetchApi'; -import { GetWithAuthGuardDataDocument } from '@components/HOCs/__generated__/withAuthGuard'; +import { GetWithAuthGuardDataDocument } from '~components/HOCs/__generated__/withAuthGuard'; +import { fetchApi } from '~lib/api/fetchApi'; export function loadAuthGuardData(email: any = 'the_email'): void { Cookie.get = jest.fn().mockReturnValue({ avSession: 'abc123' }); diff --git a/src/lib/test/renderWithProviders.tsx b/src/lib/test/renderWithProviders.tsx index aa3408829..fffde3962 100644 --- a/src/lib/test/renderWithProviders.tsx +++ b/src/lib/test/renderWithProviders.tsx @@ -2,8 +2,8 @@ import { render, RenderOptions, RenderResult } from '@testing-library/react'; import React from 'react'; import { QueryClient, QueryClientProvider } from 'react-query'; -import withIntl from '@components/HOCs/withIntl'; -import { __awaitIntlMessages } from '@lib/getIntlMessages'; +import withIntl from '~components/HOCs/withIntl'; +import { __awaitIntlMessages } from '~lib/getIntlMessages'; export default async function renderWithProviders( ui: React.ReactElement, diff --git a/src/lib/test/resolveWithDelay.ts b/src/lib/test/resolveWithDelay.ts index dec2c9b92..d44208259 100644 --- a/src/lib/test/resolveWithDelay.ts +++ b/src/lib/test/resolveWithDelay.ts @@ -1,4 +1,4 @@ -import { sleep } from '@lib/sleep'; +import { sleep } from '~lib/sleep'; export function resolveWithDelay( mock: jest.SpyInstance, diff --git a/src/lib/useLanguageId.ts b/src/lib/useLanguageId.ts index 14c3c7adf..0216cf063 100644 --- a/src/lib/useLanguageId.ts +++ b/src/lib/useLanguageId.ts @@ -1,8 +1,8 @@ -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import useLanguageRoute from '~lib/useLanguageRoute'; +import { Language } from '~src/__generated__/graphql'; import { SupportedLanguages } from './constants'; -import { Language } from '@src/__generated__/graphql'; export function useLanguageId( fallback: SupportedLanguages = Language.English diff --git a/src/lib/useLanguageRoute.ts b/src/lib/useLanguageRoute.ts index e8f8285bf..936cf3735 100644 --- a/src/lib/useLanguageRoute.ts +++ b/src/lib/useLanguageRoute.ts @@ -1,4 +1,4 @@ -import useRouterQuery from '@lib/useRouterQuery'; +import useRouterQuery from '~lib/useRouterQuery'; const useLanguageRoute = (): string => { const { language = 'en' } = useRouterQuery(); diff --git a/src/lib/useNavigationItems.tsx b/src/lib/useNavigationItems.tsx index 4f66ad96f..44fa42929 100644 --- a/src/lib/useNavigationItems.tsx +++ b/src/lib/useNavigationItems.tsx @@ -3,10 +3,10 @@ import { useRouter } from 'next/router'; import React from 'react'; import { useIntl } from 'react-intl'; -import DownloadAppButton from '@components/molecules/downloadAppButton'; -import LanguageButton from '@components/molecules/languageButton'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import DownloadAppButton from '~components/molecules/downloadAppButton'; +import LanguageButton from '~components/molecules/languageButton'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; export type INavigationItem = { key: string; @@ -25,97 +25,97 @@ const opts = { }; const iconMap = { - icon_search: dynamic(() => import('@public/img/icons/icon-search.svg'), opts), - icon_books: dynamic(() => import('@public/img/icons/icon-books.svg'), opts), - fa_bookmark: dynamic(() => import('@public/img/icons/fa-bookmark.svg'), opts), - fa_stream: dynamic(() => import('@public/img/icons/fa-stream.svg'), opts), - fa_history: dynamic(() => import('@public/img/icons/fa-history.svg'), opts), - icon_bible: dynamic(() => import('@public/img/icons/icon-bible.svg'), opts), + icon_search: dynamic(() => import('~public/img/icons/icon-search.svg'), opts), + icon_books: dynamic(() => import('~public/img/icons/icon-books.svg'), opts), + fa_bookmark: dynamic(() => import('~public/img/icons/fa-bookmark.svg'), opts), + fa_stream: dynamic(() => import('~public/img/icons/fa-stream.svg'), opts), + fa_history: dynamic(() => import('~public/img/icons/fa-history.svg'), opts), + icon_bible: dynamic(() => import('~public/img/icons/icon-bible.svg'), opts), icon_collections: dynamic( - () => import('@public/img/icons/icon-collections.svg'), + () => import('~public/img/icons/icon-collections.svg'), opts ), - fa_list_alt: dynamic(() => import('@public/img/icons/fa-list-alt.svg'), opts), + fa_list_alt: dynamic(() => import('~public/img/icons/fa-list-alt.svg'), opts), fa_user_plus_heavy: dynamic( - () => import('@public/img/icons/fa-user-plus-heavy.svg'), + () => import('~public/img/icons/fa-user-plus-heavy.svg'), opts ), - fa_calendar: dynamic(() => import('@public/img/icons/fa-calendar.svg'), opts), + fa_calendar: dynamic(() => import('~public/img/icons/fa-calendar.svg'), opts), fa_user_heavy: dynamic( - () => import('@public/img/icons/fa-user-heavy.svg'), + () => import('~public/img/icons/fa-user-heavy.svg'), opts ), - fa_feather: dynamic(() => import('@public/img/icons/fa-feather.svg'), opts), - fa_book: dynamic(() => import('@public/img/icons/fa-book.svg'), opts), - fa_music: dynamic(() => import('@public/img/icons/fa-music.svg'), opts), + fa_feather: dynamic(() => import('~public/img/icons/fa-feather.svg'), opts), + fa_book: dynamic(() => import('~public/img/icons/fa-book.svg'), opts), + fa_music: dynamic(() => import('~public/img/icons/fa-music.svg'), opts), icon_account: dynamic( - () => import('@public/img/icons/icon-account.svg'), + () => import('~public/img/icons/icon-account.svg'), opts ), icon_our_story: dynamic( - () => import('@public/img/icons/icon-our-story.svg'), + () => import('~public/img/icons/icon-our-story.svg'), opts ), - fa_seedling: dynamic(() => import('@public/img/icons/fa-seedling.svg'), opts), + fa_seedling: dynamic(() => import('~public/img/icons/fa-seedling.svg'), opts), fa_users_heavy: dynamic( - () => import('@public/img/icons/fa-users-heavy.svg'), + () => import('~public/img/icons/fa-users-heavy.svg'), opts ), fa_bullseye_heavy: dynamic( - () => import('@public/img/icons/fa-bullseye-heavy.svg'), + () => import('~public/img/icons/fa-bullseye-heavy.svg'), opts ), fa_fire_heavy: dynamic( - () => import('@public/img/icons/fa-fire-heavy.svg'), + () => import('~public/img/icons/fa-fire-heavy.svg'), opts ), fa_align_left: dynamic( - () => import('@public/img/icons/fa-align-left.svg'), + () => import('~public/img/icons/fa-align-left.svg'), opts ), fa_comment_heavy: dynamic( - () => import('@public/img/icons/fa-comment-heavy.svg'), + () => import('~public/img/icons/fa-comment-heavy.svg'), opts ), fa_heart_heavy: dynamic( - () => import('@public/img/icons/fa-heart-heavy.svg'), + () => import('~public/img/icons/fa-heart-heavy.svg'), opts ), icon_contact: dynamic( - () => import('@public/img/icons/icon-contact.svg'), + () => import('~public/img/icons/icon-contact.svg'), opts ), - fa_inbox: dynamic(() => import('@public/img/icons/fa-inbox.svg'), opts), - fa_facebook: dynamic(() => import('@public/img/icons/fa-facebook.svg'), opts), + fa_inbox: dynamic(() => import('~public/img/icons/fa-inbox.svg'), opts), + fa_facebook: dynamic(() => import('~public/img/icons/fa-facebook.svg'), opts), fa_instagram: dynamic( - () => import('@public/img/icons/fa-instagram.svg'), + () => import('~public/img/icons/fa-instagram.svg'), opts ), - fa_twitter: dynamic(() => import('@public/img/icons/fa-twitter.svg'), opts), - fa_youtube: dynamic(() => import('@public/img/icons/fa-youtube.svg'), opts), - icon_more: dynamic(() => import('@public/img/icons/icon-more.svg'), opts), + fa_twitter: dynamic(() => import('~public/img/icons/fa-twitter.svg'), opts), + fa_youtube: dynamic(() => import('~public/img/icons/fa-youtube.svg'), opts), + icon_more: dynamic(() => import('~public/img/icons/icon-more.svg'), opts), fa_question_circle: dynamic( - () => import('@public/img/icons/fa-question-circle.svg'), + () => import('~public/img/icons/fa-question-circle.svg'), opts ), - fa_link: dynamic(() => import('@public/img/icons/fa-link.svg'), opts), + fa_link: dynamic(() => import('~public/img/icons/fa-link.svg'), opts), fa_landmark_heavy: dynamic( - () => import('@public/img/icons/fa-landmark-heavy.svg'), + () => import('~public/img/icons/fa-landmark-heavy.svg'), opts ), fa_lock_heavy: dynamic( - () => import('@public/img/icons/fa-lock-heavy.svg'), + () => import('~public/img/icons/fa-lock-heavy.svg'), opts ), fa_newspaper_heavy: dynamic( - () => import('@public/img/icons/fa-newspaper-heavy.svg'), + () => import('~public/img/icons/fa-newspaper-heavy.svg'), opts ), icon_sign_out: dynamic( - () => import('@public/img/icons/icon-sign-out.svg'), + () => import('~public/img/icons/icon-sign-out.svg'), opts ), - fa_store: dynamic(() => import('@public/img/icons/fa-store.svg'), opts), + fa_store: dynamic(() => import('~public/img/icons/fa-store.svg'), opts), }; export function useNavigationItems(): INavigationItem[] { diff --git a/src/lib/usePlaybackSession.tsx b/src/lib/usePlaybackSession.tsx index 7f656eb38..29b0479ce 100644 --- a/src/lib/usePlaybackSession.tsx +++ b/src/lib/usePlaybackSession.tsx @@ -1,15 +1,15 @@ import React, { useContext, useEffect, useRef, useState } from 'react'; +import { + AndMiniplayerFragment, + useGetRecordingPlaybackProgressQuery, +} from '~components/templates/__generated__/andMiniplayer'; import { getSources, PlaybackContext, PlaybackContextType, shouldLoadRecordingPlaybackProgress, -} from '@components/templates/andPlaybackContext'; -import { - AndMiniplayerFragment, - useGetRecordingPlaybackProgressQuery, -} from '@components/templates/__generated__/andMiniplayer'; +} from '~components/templates/andPlaybackContext'; interface PlaybackSessionInfo { shiftTime: (delta: number) => void; diff --git a/src/lib/useQueryString.ts b/src/lib/useQueryString.ts index b878187c5..f5ca6a873 100644 --- a/src/lib/useQueryString.ts +++ b/src/lib/useQueryString.ts @@ -1,4 +1,4 @@ -import useRouterQuery from '@lib/useRouterQuery'; +import useRouterQuery from '~lib/useRouterQuery'; export function useQueryString(key: string): string | undefined { return useRouterQuery()[key]?.toString(); diff --git a/src/lib/useRouterQuery.ts b/src/lib/useRouterQuery.ts index 680a4d3f1..b44bc5269 100644 --- a/src/lib/useRouterQuery.ts +++ b/src/lib/useRouterQuery.ts @@ -1,6 +1,5 @@ -import { ParsedUrlQuery } from 'querystring'; - import { useRouter } from 'next/router'; +import { ParsedUrlQuery } from 'querystring'; export default function useRouterQuery(): ParsedUrlQuery { const router = useRouter(); diff --git a/src/pages/404.tsx b/src/pages/404.tsx index 079ba73f6..b5dbfc355 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -1,7 +1,7 @@ import { GetStaticPropsResult } from 'next'; -import NotFound, { NotFoundProps } from '@components/organisms/notFound'; -import { getNotFoundPageData } from '@components/organisms/__generated__/notFound'; +import { getNotFoundPageData } from '~components/organisms/__generated__/notFound'; +import NotFound, { NotFoundProps } from '~components/organisms/notFound'; export default NotFound; diff --git a/src/pages/[language]/about/1/[[...slugs]].ts b/src/pages/[language]/about/1/[[...slugs]].ts index 389a35b65..4722bcfd2 100644 --- a/src/pages/[language]/about/1/[[...slugs]].ts +++ b/src/pages/[language]/about/1/[[...slugs]].ts @@ -4,13 +4,13 @@ import { GetStaticPropsResult, } from 'next'; -import OurStory from '@containers/about/story'; -import { IBaseProps } from '@containers/base'; -import { REVALIDATE } from '@lib/constants'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; +import OurStory from '~containers/about/story'; +import { IBaseProps } from '~containers/base'; +import { REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default OurStory; diff --git a/src/pages/[language]/about/12/[[...slugs]].ts b/src/pages/[language]/about/12/[[...slugs]].ts index fc59069d2..3bd6b72f8 100644 --- a/src/pages/[language]/about/12/[[...slugs]].ts +++ b/src/pages/[language]/about/12/[[...slugs]].ts @@ -4,13 +4,13 @@ import { GetStaticPropsResult, } from 'next'; -import SpiritOfAv from '@containers/about/spirit'; -import { IBaseProps } from '@containers/base'; -import { REVALIDATE } from '@lib/constants'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; +import SpiritOfAv from '~containers/about/spirit'; +import { IBaseProps } from '~containers/base'; +import { REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default SpiritOfAv; diff --git a/src/pages/[language]/about/13/[[...slugs]].ts b/src/pages/[language]/about/13/[[...slugs]].ts index 2c50b2609..8415d4a7c 100644 --- a/src/pages/[language]/about/13/[[...slugs]].ts +++ b/src/pages/[language]/about/13/[[...slugs]].ts @@ -4,13 +4,13 @@ import { GetStaticPropsResult, } from 'next'; -import Team from '@containers/about/team'; -import { IBaseProps } from '@containers/base'; -import { REVALIDATE } from '@lib/constants'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; +import Team from '~containers/about/team'; +import { IBaseProps } from '~containers/base'; +import { REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default Team; diff --git a/src/pages/[language]/about/7/[[...slugs]].ts b/src/pages/[language]/about/7/[[...slugs]].ts index dcc871d6f..5173ddbee 100644 --- a/src/pages/[language]/about/7/[[...slugs]].ts +++ b/src/pages/[language]/about/7/[[...slugs]].ts @@ -4,13 +4,13 @@ import { GetStaticPropsResult, } from 'next'; -import Purpose from '@containers/about/purpose'; -import { IBaseProps } from '@containers/base'; -import { REVALIDATE } from '@lib/constants'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; +import Purpose from '~containers/about/purpose'; +import { IBaseProps } from '~containers/base'; +import { REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default Purpose; diff --git a/src/pages/[language]/about/[id]/[[...slugs]].ts b/src/pages/[language]/about/[id]/[[...slugs]].ts index ec2a0b4c2..bb2ef53ca 100644 --- a/src/pages/[language]/about/[id]/[[...slugs]].ts +++ b/src/pages/[language]/about/[id]/[[...slugs]].ts @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import About, { AboutProps } from '@containers/about'; -import { IBaseProps } from '@containers/base'; -import { REVALIDATE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; +import About, { AboutProps } from '~containers/about'; import { getAboutPageData, getAboutStaticPaths, -} from '@containers/about/__generated__'; -import { PageType } from '@src/__generated__/graphql'; +} from '~containers/about/__generated__'; +import { IBaseProps } from '~containers/base'; +import { REVALIDATE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { PageType } from '~src/__generated__/graphql'; export default About; diff --git a/src/pages/[language]/account/login.ts b/src/pages/[language]/account/login.ts index 7e87d88e1..20d3088f6 100644 --- a/src/pages/[language]/account/login.ts +++ b/src/pages/[language]/account/login.ts @@ -4,13 +4,13 @@ import { GetStaticPropsResult, } from 'next'; -import Login from '@containers/account/login'; -import { IBaseProps } from '@containers/base'; -import { REVALIDATE } from '@lib/constants'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; +import Login from '~containers/account/login'; +import { IBaseProps } from '~containers/base'; +import { REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default Login; diff --git a/src/pages/[language]/account/logout.tsx b/src/pages/[language]/account/logout.tsx index 1b4c466ca..2e1df4957 100644 --- a/src/pages/[language]/account/logout.tsx +++ b/src/pages/[language]/account/logout.tsx @@ -2,9 +2,9 @@ import { useRouter } from 'next/router'; import React, { useEffect, useState } from 'react'; import { FormattedMessage } from 'react-intl'; -import { useLogout } from '@lib/api/useLogout'; -import root from '@lib/routes'; -import useLanguageRoute from '@lib/useLanguageRoute'; +import { useLogout } from '~lib/api/useLogout'; +import root from '~lib/routes'; +import useLanguageRoute from '~lib/useLanguageRoute'; export default function Logout(): JSX.Element { const router = useRouter(); diff --git a/src/pages/[language]/account/preferences.ts b/src/pages/[language]/account/preferences.ts index 0c9af6380..c36c4e1d6 100644 --- a/src/pages/[language]/account/preferences.ts +++ b/src/pages/[language]/account/preferences.ts @@ -1,10 +1,9 @@ import { GetServerSidePropsContext } from 'next'; -import Preferences from '@containers/account/preferences'; -import { storeRequest } from '@lib/api/storeRequest'; - -import getDehydratedProps, { DehydratedProps } from '@lib/getDehydratedProps'; -import { getAccountPreferencesData } from '@containers/account/__generated__/preferences'; +import { getAccountPreferencesData } from '~containers/account/__generated__/preferences'; +import Preferences from '~containers/account/preferences'; +import { storeRequest } from '~lib/api/storeRequest'; +import getDehydratedProps, { DehydratedProps } from '~lib/getDehydratedProps'; export default Preferences; diff --git a/src/pages/[language]/account/profile.ts b/src/pages/[language]/account/profile.ts index ed68e9a40..029a1159f 100644 --- a/src/pages/[language]/account/profile.ts +++ b/src/pages/[language]/account/profile.ts @@ -1,10 +1,9 @@ import { GetServerSidePropsContext } from 'next'; -import Profile from '@containers/account/profile'; -import { storeRequest } from '@lib/api/storeRequest'; - -import getDehydratedProps, { DehydratedProps } from '@lib/getDehydratedProps'; -import { getProfileData } from '@containers/account/__generated__/profile'; +import { getProfileData } from '~containers/account/__generated__/profile'; +import Profile from '~containers/account/profile'; +import { storeRequest } from '~lib/api/storeRequest'; +import getDehydratedProps, { DehydratedProps } from '~lib/getDehydratedProps'; export default Profile; diff --git a/src/pages/[language]/account/register.tsx b/src/pages/[language]/account/register.tsx index 5a4786a10..13b47dd18 100644 --- a/src/pages/[language]/account/register.tsx +++ b/src/pages/[language]/account/register.tsx @@ -4,13 +4,13 @@ import { GetStaticPropsResult, } from 'next'; -import Register from '@containers/account/register'; -import { IBaseProps } from '@containers/base'; -import { REVALIDATE } from '@lib/constants'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; +import Register from '~containers/account/register'; +import { IBaseProps } from '~containers/base'; +import { REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default Register; diff --git a/src/pages/[language]/account/reset.tsx b/src/pages/[language]/account/reset.tsx index 60f00b6c5..6403ef956 100644 --- a/src/pages/[language]/account/reset.tsx +++ b/src/pages/[language]/account/reset.tsx @@ -1,7 +1,7 @@ import { GetServerSidePropsResult } from 'next'; -import Reset from '@containers/account/reset'; -import { IBaseProps } from '@containers/base'; +import Reset from '~containers/account/reset'; +import { IBaseProps } from '~containers/base'; export default Reset; diff --git a/src/pages/[language]/bibles/[id]/[[...slugs]].ts b/src/pages/[language]/bibles/[id]/[[...slugs]].ts index bb3c5d5f3..2d8937a96 100644 --- a/src/pages/[language]/bibles/[id]/[[...slugs]].ts +++ b/src/pages/[language]/bibles/[id]/[[...slugs]].ts @@ -4,14 +4,14 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import Version, { VersionProps } from '@containers/bible/version'; -import { getBible, getBibles } from '@lib/api/bibleBrain'; -import { LANGUAGES, REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import root from '@lib/routes'; -import { getAudiobibleVersionsData } from '@containers/bible/__generated__/versions'; -import { CollectionContentType, Language } from '@src/__generated__/graphql'; -import { getAudiobibleVersionData } from '@containers/bible/__generated__/version'; +import { IBaseProps } from '~containers/base'; +import { getAudiobibleVersionData } from '~containers/bible/__generated__/version'; +import { getAudiobibleVersionsData } from '~containers/bible/__generated__/versions'; +import Version, { VersionProps } from '~containers/bible/version'; +import { getBible, getBibles } from '~lib/api/bibleBrain'; +import { LANGUAGES, REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import root from '~lib/routes'; +import { CollectionContentType, Language } from '~src/__generated__/graphql'; export default Version; diff --git a/src/pages/[language]/bibles/[id]/[book]/[chapter].tsx b/src/pages/[language]/bibles/[id]/[book]/[chapter].tsx index 777a4723e..49cb7e80d 100644 --- a/src/pages/[language]/bibles/[id]/[book]/[chapter].tsx +++ b/src/pages/[language]/bibles/[id]/[book]/[chapter].tsx @@ -4,11 +4,11 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import Book, { BookProps } from '@containers/bible/book'; -import { getBible, getBibleBookChapters, getBibles } from '@lib/api/bibleBrain'; -import { LANGUAGES, REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import root from '@lib/routes'; +import { IBaseProps } from '~containers/base'; +import Book, { BookProps } from '~containers/bible/book'; +import { getBible, getBibleBookChapters, getBibles } from '~lib/api/bibleBrain'; +import { LANGUAGES, REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import root from '~lib/routes'; export default Book; diff --git a/src/pages/[language]/bibles/chapters/[id]/[[...slugs]].ts b/src/pages/[language]/bibles/chapters/[id]/[[...slugs]].ts index 290fa787d..c4abedc5e 100644 --- a/src/pages/[language]/bibles/chapters/[id]/[[...slugs]].ts +++ b/src/pages/[language]/bibles/chapters/[id]/[[...slugs]].ts @@ -4,16 +4,16 @@ import { GetStaticPropsResult, } from 'next'; -import { Recording } from '@components/organisms/recording'; -import { IBaseProps } from '@containers/base'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; +import { RecordingFragment } from '~components/organisms/__generated__/recording'; +import { Recording } from '~components/organisms/recording'; +import { IBaseProps } from '~containers/base'; import { getAudiobibleBookDetailData, getAudiobibleBookPathsData, -} from '@containers/bible/__generated__/book'; -import { RecordingContentType } from '@src/__generated__/graphql'; -import { RecordingFragment } from '@components/organisms/__generated__/recording'; +} from '~containers/bible/__generated__/book'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { RecordingContentType } from '~src/__generated__/graphql'; export default Recording; diff --git a/src/pages/[language]/bibles/index.tsx b/src/pages/[language]/bibles/index.tsx index 69fd3a54c..05963a6a7 100644 --- a/src/pages/[language]/bibles/index.tsx +++ b/src/pages/[language]/bibles/index.tsx @@ -4,15 +4,14 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import Versions, { VersionsProps } from '@containers/bible/versions'; -import { getBibles } from '@lib/api/bibleBrain'; -import { LANGUAGES, REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; - -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import root from '@lib/routes'; -import { getAudiobibleVersionsData } from '@containers/bible/__generated__/versions'; +import { IBaseProps } from '~containers/base'; +import { getAudiobibleVersionsData } from '~containers/bible/__generated__/versions'; +import Versions, { VersionsProps } from '~containers/bible/versions'; +import { getBibles } from '~lib/api/bibleBrain'; +import { LANGUAGES, REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import root from '~lib/routes'; export default Versions; diff --git a/src/pages/[language]/blog/[id]/[[...slugs]].ts b/src/pages/[language]/blog/[id]/[[...slugs]].ts index 63d2a854b..d2e1a3651 100644 --- a/src/pages/[language]/blog/[id]/[[...slugs]].ts +++ b/src/pages/[language]/blog/[id]/[[...slugs]].ts @@ -4,12 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import BlogPostDetail, { BlogPostDetailProps } from '@containers/blog/detail'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getBlogDetailData, getBlogDetailStaticPaths } from '@containers/blog/__generated__/detail'; +import { IBaseProps } from '~containers/base'; +import { + getBlogDetailData, + getBlogDetailStaticPaths, +} from '~containers/blog/__generated__/detail'; +import BlogPostDetail, { BlogPostDetailProps } from '~containers/blog/detail'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; export default BlogPostDetail; diff --git a/src/pages/[language]/blog/page/[i].tsx b/src/pages/[language]/blog/page/[i].tsx index 17f43b94d..b41dba89c 100644 --- a/src/pages/[language]/blog/page/[i].tsx +++ b/src/pages/[language]/blog/page/[i].tsx @@ -4,16 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import Blog, { BlogProps } from '@containers/blog'; - -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getNumberedStaticPaths } from '@lib/getNumberedStaticPaths'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; import { getBlogPageData, getBlogPathsData, -} from '@containers/__generated__/blog'; +} from '~containers/__generated__/blog'; +import Blog, { BlogProps } from '~containers/blog'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getNumberedStaticPaths } from '~lib/getNumberedStaticPaths'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default Blog; diff --git a/src/pages/[language]/books/[id]/[[...slugs]].tsx b/src/pages/[language]/books/[id]/[[...slugs]].tsx index 9598f73b1..0462f5e7c 100644 --- a/src/pages/[language]/books/[id]/[[...slugs]].tsx +++ b/src/pages/[language]/books/[id]/[[...slugs]].tsx @@ -4,17 +4,17 @@ import { GetStaticPropsResult, } from 'next'; -import AudiobookDetail, { - AudiobookDetailProps, -} from '@containers/audiobook/detail'; -import { IBaseProps } from '@containers/base'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; import { getAudiobookDetailPageData, getAudiobookDetailPathsData, -} from '@containers/audiobook/__generated__/detail'; +} from '~containers/audiobook/__generated__/detail'; +import AudiobookDetail, { + AudiobookDetailProps, +} from '~containers/audiobook/detail'; +import { IBaseProps } from '~containers/base'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default AudiobookDetail; diff --git a/src/pages/[language]/books/[id]/feed.xml/index.ts b/src/pages/[language]/books/[id]/feed.xml/index.ts index 0093de78c..f64b5064a 100644 --- a/src/pages/[language]/books/[id]/feed.xml/index.ts +++ b/src/pages/[language]/books/[id]/feed.xml/index.ts @@ -1,11 +1,12 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; -import { generateFeed, sendRSSHeaders } from '@lib/generateFeed'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; +import { getAudiobookFeedData } from '~containers/audiobook/__generated__/detail'; +import { generateFeed, sendRSSHeaders } from '~lib/generateFeed'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; +import { SequenceContentType } from '~src/__generated__/graphql'; + import { BookFeedDescriptionFragment } from './__generated__/bookFeedDescription'; -import { getAudiobookFeedData } from '@containers/audiobook/__generated__/detail'; -import { SequenceContentType } from '@src/__generated__/graphql'; export default (): void => void 0; diff --git a/src/pages/[language]/books/page/[i].tsx b/src/pages/[language]/books/page/[i].tsx index 1912474d9..97779cb87 100644 --- a/src/pages/[language]/books/page/[i].tsx +++ b/src/pages/[language]/books/page/[i].tsx @@ -4,17 +4,17 @@ import { GetStaticPropsResult, } from 'next'; -import AudiobooksList, { - AudiobooksListProps, -} from '@containers/audiobook/list'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getNumberedStaticPaths } from '@lib/getNumberedStaticPaths'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; import { getAudiobookListPageData, getAudiobookListPathsData, -} from '@containers/audiobook/__generated__/list'; +} from '~containers/audiobook/__generated__/list'; +import AudiobooksList, { + AudiobooksListProps, +} from '~containers/audiobook/list'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getNumberedStaticPaths } from '~lib/getNumberedStaticPaths'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default AudiobooksList; diff --git a/src/pages/[language]/books/tracks/[id]/[[...slugs]].tsx b/src/pages/[language]/books/tracks/[id]/[[...slugs]].tsx index 5c893e1d3..3ae34275d 100644 --- a/src/pages/[language]/books/tracks/[id]/[[...slugs]].tsx +++ b/src/pages/[language]/books/tracks/[id]/[[...slugs]].tsx @@ -4,17 +4,17 @@ import { GetStaticPropsResult, } from 'next'; -import AudiobookTrackDetail, { - AudiobookTrackDetailProps, -} from '@containers/audiobook/tracks/detail'; -import { IBaseProps } from '@containers/base'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; import { getAudiobookTrackDetailData, getAudiobookTrackDetailStaticPaths, -} from '@containers/audiobook/tracks/__generated__/detail'; +} from '~containers/audiobook/tracks/__generated__/detail'; +import AudiobookTrackDetail, { + AudiobookTrackDetailProps, +} from '~containers/audiobook/tracks/detail'; +import { IBaseProps } from '~containers/base'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default AudiobookTrackDetail; diff --git a/src/pages/[language]/conferences/[id]/[[...slug]].tsx b/src/pages/[language]/conferences/[id]/[[...slug]].tsx index b5715c1da..5f5764b9e 100644 --- a/src/pages/[language]/conferences/[id]/[[...slug]].tsx +++ b/src/pages/[language]/conferences/[id]/[[...slug]].tsx @@ -4,17 +4,17 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import CollectionDetail, { - CollectionDetailProps, -} from '@containers/collection/detail'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; +import { IBaseProps } from '~containers/base'; import { getCollectionDetailPageData, getCollectionDetailPathsData, -} from '@containers/collection/__generated__/detail'; +} from '~containers/collection/__generated__/detail'; +import CollectionDetail, { + CollectionDetailProps, +} from '~containers/collection/detail'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default CollectionDetail; diff --git a/src/pages/[language]/conferences/[id]/feed.xml/index.ts b/src/pages/[language]/conferences/[id]/feed.xml/index.ts index fc6e0f30d..15d6f6654 100644 --- a/src/pages/[language]/conferences/[id]/feed.xml/index.ts +++ b/src/pages/[language]/conferences/[id]/feed.xml/index.ts @@ -1,8 +1,8 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; -import { generateFeed, sendRSSHeaders } from '@lib/generateFeed'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; -import { getCollectionFeedData } from '@containers/collection/__generated__/detail'; +import { getCollectionFeedData } from '~containers/collection/__generated__/detail'; +import { generateFeed, sendRSSHeaders } from '~lib/generateFeed'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default function Feed(): void { return void 0; diff --git a/src/pages/[language]/conferences/[id]/presenters/page/[i].tsx b/src/pages/[language]/conferences/[id]/presenters/page/[i].tsx index b46e3959d..9a33341da 100644 --- a/src/pages/[language]/conferences/[id]/presenters/page/[i].tsx +++ b/src/pages/[language]/conferences/[id]/presenters/page/[i].tsx @@ -4,14 +4,14 @@ import { GetStaticPropsResult, } from 'next'; +import { getCollectionDetailPathsData } from '~containers/collection/__generated__/detail'; +import { getCollectionPresentersPageData } from '~containers/collection/__generated__/presenters'; import CollectionPresenters, { CollectionPresentersProps, -} from '@containers/collection/presenters'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import getIntl from '@lib/getIntl'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; -import { getCollectionPresentersPageData } from '@containers/collection/__generated__/presenters'; -import { getCollectionDetailPathsData } from '@containers/collection/__generated__/detail'; +} from '~containers/collection/presenters'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import getIntl from '~lib/getIntl'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default CollectionPresenters; diff --git a/src/pages/[language]/conferences/[id]/sequences/page/[i].ts b/src/pages/[language]/conferences/[id]/sequences/page/[i].ts index d2b306203..fe96047fb 100644 --- a/src/pages/[language]/conferences/[id]/sequences/page/[i].ts +++ b/src/pages/[language]/conferences/[id]/sequences/page/[i].ts @@ -4,14 +4,14 @@ import { GetStaticPropsResult, } from 'next'; +import { getCollectionDetailPathsData } from '~containers/collection/__generated__/detail'; +import { getCollectionSequencesPageData } from '~containers/collection/__generated__/sequences'; import CollectionSequences, { CollectionSequencesProps, -} from '@containers/collection/sequences'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import getIntl from '@lib/getIntl'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; -import { getCollectionSequencesPageData } from '@containers/collection/__generated__/sequences'; -import { getCollectionDetailPathsData } from '@containers/collection/__generated__/detail'; +} from '~containers/collection/sequences'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import getIntl from '~lib/getIntl'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default CollectionSequences; diff --git a/src/pages/[language]/conferences/[id]/teachings/page/[i].ts b/src/pages/[language]/conferences/[id]/teachings/page/[i].ts index f79259dd9..624815649 100644 --- a/src/pages/[language]/conferences/[id]/teachings/page/[i].ts +++ b/src/pages/[language]/conferences/[id]/teachings/page/[i].ts @@ -4,14 +4,14 @@ import { GetStaticPropsResult, } from 'next'; +import { getCollectionDetailPathsData } from '~containers/collection/__generated__/detail'; +import { getCollectionTeachingsPageData } from '~containers/collection/__generated__/teachings'; import CollectionTeachings, { CollectionTeachingsProps, -} from '@containers/collection/teachings'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import getIntl from '@lib/getIntl'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; -import { getCollectionDetailPathsData } from '@containers/collection/__generated__/detail'; -import { getCollectionTeachingsPageData } from '@containers/collection/__generated__/teachings'; +} from '~containers/collection/teachings'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import getIntl from '~lib/getIntl'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default CollectionTeachings; diff --git a/src/pages/[language]/conferences/page/[i].tsx b/src/pages/[language]/conferences/page/[i].tsx index bccb73d12..1064ea762 100644 --- a/src/pages/[language]/conferences/page/[i].tsx +++ b/src/pages/[language]/conferences/page/[i].tsx @@ -4,17 +4,17 @@ import { GetStaticPropsResult, } from 'next'; -import CollectionList, { - CollectionListProps, -} from '@containers/collection/list'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getNumberedStaticPaths } from '@lib/getNumberedStaticPaths'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; import { getCollectionListPageData, getCollectionListPathsData, -} from '@containers/collection/__generated__/list'; +} from '~containers/collection/__generated__/list'; +import CollectionList, { + CollectionListProps, +} from '~containers/collection/list'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getNumberedStaticPaths } from '~lib/getNumberedStaticPaths'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default CollectionList; diff --git a/src/pages/[language]/contact/[type].ts b/src/pages/[language]/contact/[type].ts index 0858f6110..516d04b49 100644 --- a/src/pages/[language]/contact/[type].ts +++ b/src/pages/[language]/contact/[type].ts @@ -4,12 +4,12 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import Contact, { ContactProps } from '@containers/contact'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; +import { IBaseProps } from '~containers/base'; +import Contact, { ContactProps } from '~containers/contact'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default Contact; diff --git a/src/pages/[language]/discover/collections.ts b/src/pages/[language]/discover/collections.ts index def7d37ed..d6995e19e 100644 --- a/src/pages/[language]/discover/collections.ts +++ b/src/pages/[language]/discover/collections.ts @@ -4,17 +4,16 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; +import { IBaseProps } from '~containers/base'; +import { getDiscoverCollectionsPageData } from '~containers/discover/__generated__/collections'; import DiscoverCollections, { IDiscoverCollectionsProps, -} from '@containers/discover/collections'; -import { REVALIDATE } from '@lib/constants'; - -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; -import { getDiscoverCollectionsPageData } from '@containers/discover/__generated__/collections'; +} from '~containers/discover/collections'; +import { REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default DiscoverCollections; diff --git a/src/pages/[language]/discover/index.ts b/src/pages/[language]/discover/index.ts index 4b9670709..9c03291f2 100644 --- a/src/pages/[language]/discover/index.ts +++ b/src/pages/[language]/discover/index.ts @@ -4,15 +4,14 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import Discover, { DiscoverProps } from '@containers/discover'; -import { REVALIDATE } from '@lib/constants'; - -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; -import { getDiscoverPageData } from '@containers/__generated__/discover'; +import { getDiscoverPageData } from '~containers/__generated__/discover'; +import { IBaseProps } from '~containers/base'; +import Discover, { DiscoverProps } from '~containers/discover'; +import { REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default Discover; diff --git a/src/pages/[language]/embed/media/[id].ts b/src/pages/[language]/embed/media/[id].ts index e9e5f2d42..048f5350c 100644 --- a/src/pages/[language]/embed/media/[id].ts +++ b/src/pages/[language]/embed/media/[id].ts @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import SermonEmbed, { SermonEmbedProps } from '@containers/sermon/embed'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; +import { IBaseProps } from '~containers/base'; import { getSermonDetailData, getSermonDetailStaticPaths, -} from '@containers/sermon/__generated__/detail'; +} from '~containers/sermon/__generated__/detail'; +import SermonEmbed, { SermonEmbedProps } from '~containers/sermon/embed'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default SermonEmbed; diff --git a/src/pages/[language]/give.ts b/src/pages/[language]/give.ts index 2466c2d53..470cf866f 100644 --- a/src/pages/[language]/give.ts +++ b/src/pages/[language]/give.ts @@ -4,13 +4,13 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import Give from '@containers/give'; -import { REVALIDATE } from '@lib/constants'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; +import { IBaseProps } from '~containers/base'; +import Give from '~containers/give'; +import { REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default Give; diff --git a/src/pages/[language]/index.ts b/src/pages/[language]/index.ts index 88973b883..c9ee22b93 100644 --- a/src/pages/[language]/index.ts +++ b/src/pages/[language]/index.ts @@ -4,13 +4,12 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import Home, { HomeProps } from '@containers/home'; -import { REVALIDATE } from '@lib/constants'; - -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import { getValidLanguage } from '@lib/getValidLanguage'; -import { getHomeStaticProps } from '@containers/__generated__/home'; +import { getHomeStaticProps } from '~containers/__generated__/home'; +import { IBaseProps } from '~containers/base'; +import Home, { HomeProps } from '~containers/home'; +import { REVALIDATE } from '~lib/constants'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import { getValidLanguage } from '~lib/getValidLanguage'; export default Home; diff --git a/src/pages/[language]/library/history.tsx b/src/pages/[language]/library/history.tsx index 228a018f2..8e7fb594c 100644 --- a/src/pages/[language]/library/history.tsx +++ b/src/pages/[language]/library/history.tsx @@ -2,9 +2,9 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; import LibraryHistory, { ILibraryHistoryProps, -} from '@containers/library/history'; -import { storeRequest } from '@lib/api/storeRequest'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; +} from '~containers/library/history'; +import { storeRequest } from '~lib/api/storeRequest'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; export default LibraryHistory; diff --git a/src/pages/[language]/library/index.ts b/src/pages/[language]/library/index.ts index 26b25c060..a2bd0b37f 100644 --- a/src/pages/[language]/library/index.ts +++ b/src/pages/[language]/library/index.ts @@ -1,8 +1,8 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; -import Library, { ILibraryProps } from '@containers/library/library'; -import { storeRequest } from '@lib/api/storeRequest'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; +import Library, { ILibraryProps } from '~containers/library/library'; +import { storeRequest } from '~lib/api/storeRequest'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; export default Library; diff --git a/src/pages/[language]/library/playlist/[id].ts b/src/pages/[language]/library/playlist/[id].ts index 10d713cbe..0db8d9f26 100644 --- a/src/pages/[language]/library/playlist/[id].ts +++ b/src/pages/[language]/library/playlist/[id].ts @@ -1,10 +1,10 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; +import { getLibraryPlaylistPageData } from '~containers/library/playlist/__generated__/detail'; import LibraryPlaylistDetail, { ILibraryPlaylistDetailProps, -} from '@containers/library/playlist/detail'; -import { storeRequest } from '@lib/api/storeRequest'; -import { getLibraryPlaylistPageData } from '@containers/library/playlist/__generated__/detail'; +} from '~containers/library/playlist/detail'; +import { storeRequest } from '~lib/api/storeRequest'; export default LibraryPlaylistDetail; diff --git a/src/pages/[language]/library/playlists.ts b/src/pages/[language]/library/playlists.ts index a9006bbcc..34e5f16cc 100644 --- a/src/pages/[language]/library/playlists.ts +++ b/src/pages/[language]/library/playlists.ts @@ -2,9 +2,9 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; import LibraryPlaylists, { ILibraryPlaylistsProps, -} from '@containers/library/playlist/list'; -import { storeRequest } from '@lib/api/storeRequest'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; +} from '~containers/library/playlist/list'; +import { storeRequest } from '~lib/api/storeRequest'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; export default LibraryPlaylists; diff --git a/src/pages/[language]/page/[id]/[[...slugs]].ts b/src/pages/[language]/page/[id]/[[...slugs]].ts index 01f8db602..332297421 100644 --- a/src/pages/[language]/page/[id]/[[...slugs]].ts +++ b/src/pages/[language]/page/[id]/[[...slugs]].ts @@ -1,18 +1,19 @@ -import CustomPageDetail, { - CustomPageDetailProps, -} from '@containers/page/detail'; import { GetStaticPathsResult, GetStaticPropsContext, GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; + +import { IBaseProps } from '~containers/base'; import { getCustomDetailPageData, getCustomDetailPageStaticPaths, -} from '@containers/page/__generated__/detail'; -import { PageType } from '@src/__generated__/graphql'; +} from '~containers/page/__generated__/detail'; +import CustomPageDetail, { + CustomPageDetailProps, +} from '~containers/page/detail'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { PageType } from '~src/__generated__/graphql'; export default CustomPageDetail; diff --git a/src/pages/[language]/presenters/[id]/[[...slug]].tsx b/src/pages/[language]/presenters/[id]/[[...slug]].tsx index b327c5e16..3309e747a 100644 --- a/src/pages/[language]/presenters/[id]/[[...slug]].tsx +++ b/src/pages/[language]/presenters/[id]/[[...slug]].tsx @@ -4,17 +4,17 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import PresenterDetail, { - PresenterDetailProps, -} from '@containers/presenter/detail'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; +import { IBaseProps } from '~containers/base'; import { getPresenterDetailPageData, getPresenterDetailPathsData, -} from '@containers/presenter/__generated__/detail'; +} from '~containers/presenter/__generated__/detail'; +import PresenterDetail, { + PresenterDetailProps, +} from '~containers/presenter/detail'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; export default PresenterDetail; diff --git a/src/pages/[language]/presenters/[id]/appears/page/[i].tsx b/src/pages/[language]/presenters/[id]/appears/page/[i].tsx index e595dc432..52fc12093 100644 --- a/src/pages/[language]/presenters/[id]/appears/page/[i].tsx +++ b/src/pages/[language]/presenters/[id]/appears/page/[i].tsx @@ -4,14 +4,14 @@ import { GetStaticPropsResult, } from 'next'; +import { getPresenterAppearsPageData } from '~containers/presenter/__generated__/appears'; +import { getPresenterDetailPathsData } from '~containers/presenter/__generated__/detail'; import PresenterAppears, { PresenterAppearsProps, -} from '@containers/presenter/appears'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import getIntl from '@lib/getIntl'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; -import { getPresenterDetailPathsData } from '@containers/presenter/__generated__/detail'; -import { getPresenterAppearsPageData } from '@containers/presenter/__generated__/appears'; +} from '~containers/presenter/appears'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import getIntl from '~lib/getIntl'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default PresenterAppears; diff --git a/src/pages/[language]/presenters/[id]/feed.xml/index.ts b/src/pages/[language]/presenters/[id]/feed.xml/index.ts index 05f21cca3..b62b0c12f 100644 --- a/src/pages/[language]/presenters/[id]/feed.xml/index.ts +++ b/src/pages/[language]/presenters/[id]/feed.xml/index.ts @@ -1,9 +1,9 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; -import { generateFeed, sendRSSHeaders } from '@lib/generateFeed'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; -import { getPresenterRecordingsFeedData } from '@containers/presenter/__generated__/recordings'; +import { getPresenterRecordingsFeedData } from '~containers/presenter/__generated__/recordings'; +import { generateFeed, sendRSSHeaders } from '~lib/generateFeed'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default (): void => void 0; diff --git a/src/pages/[language]/presenters/[id]/sequences/page/[i].tsx b/src/pages/[language]/presenters/[id]/sequences/page/[i].tsx index 08eaf0db6..1b145e365 100644 --- a/src/pages/[language]/presenters/[id]/sequences/page/[i].tsx +++ b/src/pages/[language]/presenters/[id]/sequences/page/[i].tsx @@ -4,14 +4,14 @@ import { GetStaticPropsResult, } from 'next'; +import { getPresenterDetailPathsData } from '~containers/presenter/__generated__/detail'; +import { getPresenterSequencesPageData } from '~containers/presenter/__generated__/sequences'; import PresenterSequences, { PresenterSequencesProps, -} from '@containers/presenter/sequences'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import getIntl from '@lib/getIntl'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; -import { getPresenterDetailPathsData } from '@containers/presenter/__generated__/detail'; -import { getPresenterSequencesPageData } from '@containers/presenter/__generated__/sequences'; +} from '~containers/presenter/sequences'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import getIntl from '~lib/getIntl'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default PresenterSequences; diff --git a/src/pages/[language]/presenters/[id]/teachings/page/[i].tsx b/src/pages/[language]/presenters/[id]/teachings/page/[i].tsx index a33cb1b68..4d7b986e5 100644 --- a/src/pages/[language]/presenters/[id]/teachings/page/[i].tsx +++ b/src/pages/[language]/presenters/[id]/teachings/page/[i].tsx @@ -4,14 +4,14 @@ import { GetStaticPropsResult, } from 'next'; +import { getPresenterDetailPathsData } from '~containers/presenter/__generated__/detail'; +import { getPresenterRecordingsPageData } from '~containers/presenter/__generated__/recordings'; import PresenterRecordings, { PresenterRecordingsProps, -} from '@containers/presenter/recordings'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import getIntl from '@lib/getIntl'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; -import { getPresenterDetailPathsData } from '@containers/presenter/__generated__/detail'; -import { getPresenterRecordingsPageData } from '@containers/presenter/__generated__/recordings'; +} from '~containers/presenter/recordings'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import getIntl from '~lib/getIntl'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default PresenterRecordings; diff --git a/src/pages/[language]/presenters/[id]/top.ts b/src/pages/[language]/presenters/[id]/top.ts index 552048b97..c12be1a0c 100644 --- a/src/pages/[language]/presenters/[id]/top.ts +++ b/src/pages/[language]/presenters/[id]/top.ts @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import PresenterTop, { PresenterTopProps } from '@containers/presenter/top'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import root from '@lib/routes'; -import { getPresenterDetailPathsData } from '@containers/presenter/__generated__/detail'; -import { getPresenterTopPageData } from '@containers/presenter/__generated__/top'; +import { IBaseProps } from '~containers/base'; +import { getPresenterDetailPathsData } from '~containers/presenter/__generated__/detail'; +import { getPresenterTopPageData } from '~containers/presenter/__generated__/top'; +import PresenterTop, { PresenterTopProps } from '~containers/presenter/top'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import root from '~lib/routes'; export default PresenterTop; diff --git a/src/pages/[language]/presenters/all.tsx b/src/pages/[language]/presenters/all.tsx index 9f2f4d987..919643e4e 100644 --- a/src/pages/[language]/presenters/all.tsx +++ b/src/pages/[language]/presenters/all.tsx @@ -1,13 +1,14 @@ +import { GetStaticPropsContext, GetStaticPropsResult } from 'next'; + import { getPersonListLetterCounts, GetPersonListLetterCountsQuery, -} from '@containers/presenter/list/__generated__/list'; -import All from '@containers/presenter/list/all'; -import { REVALIDATE } from '@lib/constants'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; -import { GetStaticPropsContext, GetStaticPropsResult } from 'next'; +} from '~containers/presenter/list/__generated__/list'; +import All from '~containers/presenter/list/all'; +import { REVALIDATE } from '~lib/constants'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default All; diff --git a/src/pages/[language]/presenters/letter/[letter].tsx b/src/pages/[language]/presenters/letter/[letter].tsx index 71615ca77..2189e6471 100644 --- a/src/pages/[language]/presenters/letter/[letter].tsx +++ b/src/pages/[language]/presenters/letter/[letter].tsx @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import Presenters, { PresentersProps } from '@containers/presenter/list/letter'; -import { LANGUAGES, REVALIDATE } from '@lib/constants'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import root from '@lib/routes'; -import { getPresenterListLetterPageData } from '@containers/presenter/list/__generated__/letter'; -import { getPersonListLetterCounts } from '@containers/presenter/list/__generated__/list'; -import { Language } from '@src/__generated__/graphql'; +import { IBaseProps } from '~containers/base'; +import { getPresenterListLetterPageData } from '~containers/presenter/list/__generated__/letter'; +import { getPersonListLetterCounts } from '~containers/presenter/list/__generated__/list'; +import Presenters, { PresentersProps } from '~containers/presenter/list/letter'; +import { LANGUAGES, REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import root from '~lib/routes'; +import { Language } from '~src/__generated__/graphql'; export default Presenters; diff --git a/src/pages/[language]/releases/[id].ts b/src/pages/[language]/releases/[id].ts index 0362bbba7..f23723b96 100644 --- a/src/pages/[language]/releases/[id].ts +++ b/src/pages/[language]/releases/[id].ts @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import ReleaseDetail, { ReleaseDetailProps } from '@containers/release/detail'; -import { REVALIDATE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import root from '@lib/routes'; +import { IBaseProps } from '~containers/base'; import { getMediaReleaseFormsPageData, getMediaReleaseFormsPathsData, -} from '@containers/release/__generated__/detail'; +} from '~containers/release/__generated__/detail'; +import ReleaseDetail, { ReleaseDetailProps } from '~containers/release/detail'; +import { REVALIDATE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import root from '~lib/routes'; export default ReleaseDetail; diff --git a/src/pages/[language]/search/collections/page/[i].ts b/src/pages/[language]/search/collections/page/[i].ts index 99518303f..4e2fcce12 100644 --- a/src/pages/[language]/search/collections/page/[i].ts +++ b/src/pages/[language]/search/collections/page/[i].ts @@ -1,12 +1,11 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; +import { getSearchResultsCollections } from '~containers/search/__generated__/collections'; import SearchCollections, { SearchCollectionsProps, -} from '@containers/search/collections'; -import { storeRequest } from '@lib/api/storeRequest'; - -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; -import { getSearchResultsCollections } from '@containers/search/__generated__/collections'; +} from '~containers/search/collections'; +import { storeRequest } from '~lib/api/storeRequest'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default SearchCollections; diff --git a/src/pages/[language]/search/index.ts b/src/pages/[language]/search/index.ts index 92e35e5e4..c86ef8c56 100644 --- a/src/pages/[language]/search/index.ts +++ b/src/pages/[language]/search/index.ts @@ -4,13 +4,13 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import Search from '@containers/search'; -import { REVALIDATE } from '@lib/constants'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; +import { IBaseProps } from '~containers/base'; +import Search from '~containers/search'; +import { REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default Search; diff --git a/src/pages/[language]/search/persons/page/[i].ts b/src/pages/[language]/search/persons/page/[i].ts index 4c507587e..59fb5b52a 100644 --- a/src/pages/[language]/search/persons/page/[i].ts +++ b/src/pages/[language]/search/persons/page/[i].ts @@ -1,10 +1,9 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; -import SearchPersons, { SearchPersonsProps } from '@containers/search/persons'; -import { storeRequest } from '@lib/api/storeRequest'; - -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; -import { getSearchResultsPersons } from '@containers/search/__generated__/persons'; +import { getSearchResultsPersons } from '~containers/search/__generated__/persons'; +import SearchPersons, { SearchPersonsProps } from '~containers/search/persons'; +import { storeRequest } from '~lib/api/storeRequest'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default SearchPersons; diff --git a/src/pages/[language]/search/sequences/page/[i].ts b/src/pages/[language]/search/sequences/page/[i].ts index 4c4f0cb1d..6ec14dfcf 100644 --- a/src/pages/[language]/search/sequences/page/[i].ts +++ b/src/pages/[language]/search/sequences/page/[i].ts @@ -1,12 +1,11 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; +import { getSearchResultsSequences } from '~containers/search/__generated__/sequences'; import SearchSequences, { SearchSequencesProps, -} from '@containers/search/sequences'; -import { storeRequest } from '@lib/api/storeRequest'; - -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; -import { getSearchResultsSequences } from '@containers/search/__generated__/sequences'; +} from '~containers/search/sequences'; +import { storeRequest } from '~lib/api/storeRequest'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default SearchSequences; diff --git a/src/pages/[language]/search/sponsors/page/[i].ts b/src/pages/[language]/search/sponsors/page/[i].ts index 02b248aa9..48858cb16 100644 --- a/src/pages/[language]/search/sponsors/page/[i].ts +++ b/src/pages/[language]/search/sponsors/page/[i].ts @@ -1,12 +1,11 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; +import { getSearchResultsSponsors } from '~containers/search/__generated__/sponsors'; import SearchSponsors, { SearchSponsorsProps, -} from '@containers/search/sponsors'; -import { storeRequest } from '@lib/api/storeRequest'; - -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; -import { getSearchResultsSponsors } from '@containers/search/__generated__/sponsors'; +} from '~containers/search/sponsors'; +import { storeRequest } from '~lib/api/storeRequest'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default SearchSponsors; diff --git a/src/pages/[language]/search/teachings/page/[i].ts b/src/pages/[language]/search/teachings/page/[i].ts index 6c925d1f5..a98bcdc1a 100644 --- a/src/pages/[language]/search/teachings/page/[i].ts +++ b/src/pages/[language]/search/teachings/page/[i].ts @@ -1,12 +1,11 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; +import { getSearchResultsRecordings } from '~containers/search/__generated__/teachings'; import SearchTeachings, { SearchTeachingsProps, -} from '@containers/search/teachings'; -import { storeRequest } from '@lib/api/storeRequest'; - -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; -import { getSearchResultsRecordings } from '@containers/search/__generated__/teachings'; +} from '~containers/search/teachings'; +import { storeRequest } from '~lib/api/storeRequest'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default SearchTeachings; diff --git a/src/pages/[language]/series/[id]/[[...slug]].tsx b/src/pages/[language]/series/[id]/[[...slug]].tsx index 67b9b72e3..dfef3cf7d 100644 --- a/src/pages/[language]/series/[id]/[[...slug]].tsx +++ b/src/pages/[language]/series/[id]/[[...slug]].tsx @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import SeriesDetail, { SeriesDetailProps } from '@containers/series/detail'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; +import { IBaseProps } from '~containers/base'; import { getSeriesDetailPageData, getSeriesDetailPathsData, -} from '@containers/series/__generated__/detail'; +} from '~containers/series/__generated__/detail'; +import SeriesDetail, { SeriesDetailProps } from '~containers/series/detail'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default SeriesDetail; diff --git a/src/pages/[language]/series/[id]/feed.xml/index.ts b/src/pages/[language]/series/[id]/feed.xml/index.ts index 2c8295871..9c4cc52c4 100644 --- a/src/pages/[language]/series/[id]/feed.xml/index.ts +++ b/src/pages/[language]/series/[id]/feed.xml/index.ts @@ -1,8 +1,8 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; -import { generateFeed, sendRSSHeaders } from '@lib/generateFeed'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; -import { getSeriesFeedData } from '@containers/series/__generated__/detail'; +import { getSeriesFeedData } from '~containers/series/__generated__/detail'; +import { generateFeed, sendRSSHeaders } from '~lib/generateFeed'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default (): void => void 0; diff --git a/src/pages/[language]/series/page/[i].tsx b/src/pages/[language]/series/page/[i].tsx index c1910d6d5..9d1cee888 100644 --- a/src/pages/[language]/series/page/[i].tsx +++ b/src/pages/[language]/series/page/[i].tsx @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import SeriesList, { SeriesListProps } from '@containers/series/list'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getNumberedStaticPaths } from '@lib/getNumberedStaticPaths'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; import { getSeriesListPageData, getSeriesListPathsData, -} from '@containers/series/__generated__/list'; +} from '~containers/series/__generated__/list'; +import SeriesList, { SeriesListProps } from '~containers/series/list'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getNumberedStaticPaths } from '~lib/getNumberedStaticPaths'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default SeriesList; diff --git a/src/pages/[language]/songs/[id]/[[...slugs]].ts b/src/pages/[language]/songs/[id]/[[...slugs]].ts index 2d2719374..0c884db74 100644 --- a/src/pages/[language]/songs/[id]/[[...slugs]].ts +++ b/src/pages/[language]/songs/[id]/[[...slugs]].ts @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import SongDetail, { SongDetailProps } from '@containers/song/detail'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; +import { IBaseProps } from '~containers/base'; import { getSongDetailData, getSongDetailStaticPaths, -} from '@containers/song/__generated__/detail'; +} from '~containers/song/__generated__/detail'; +import SongDetail, { SongDetailProps } from '~containers/song/detail'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default SongDetail; diff --git a/src/pages/[language]/songs/albums/[id]/[[...slugs]].tsx b/src/pages/[language]/songs/albums/[id]/[[...slugs]].tsx index aed48ab9f..2bad39e03 100644 --- a/src/pages/[language]/songs/albums/[id]/[[...slugs]].tsx +++ b/src/pages/[language]/songs/albums/[id]/[[...slugs]].tsx @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import Song, { SongAlbumDetailProps } from '@containers/song/albums/detail'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; +import { IBaseProps } from '~containers/base'; import { getSongAlbumsDetailPageData, getSongAlbumsDetailPathsData, -} from '@containers/song/albums/__generated__/detail'; +} from '~containers/song/albums/__generated__/detail'; +import Song, { SongAlbumDetailProps } from '~containers/song/albums/detail'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default Song; diff --git a/src/pages/[language]/songs/albums/[id]/feed.xml/index.ts b/src/pages/[language]/songs/albums/[id]/feed.xml/index.ts index 20a6e9b2f..c45501fdf 100644 --- a/src/pages/[language]/songs/albums/[id]/feed.xml/index.ts +++ b/src/pages/[language]/songs/albums/[id]/feed.xml/index.ts @@ -1,8 +1,8 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; -import { generateFeed, sendRSSHeaders } from '@lib/generateFeed'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; -import { getSongAlbumFeedData } from '@containers/song/albums/__generated__/detail'; +import { getSongAlbumFeedData } from '~containers/song/albums/__generated__/detail'; +import { generateFeed, sendRSSHeaders } from '~lib/generateFeed'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default (): void => void 0; diff --git a/src/pages/[language]/songs/albums/index.ts b/src/pages/[language]/songs/albums/index.ts index b14e64bd1..77a921c3f 100644 --- a/src/pages/[language]/songs/albums/index.ts +++ b/src/pages/[language]/songs/albums/index.ts @@ -4,17 +4,16 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; +import { IBaseProps } from '~containers/base'; +import { getSongAlbumsListPageData } from '~containers/song/albums/__generated__/list'; import StoryAlbumsList, { SongAlbumsListProps, -} from '@containers/song/albums/list'; -import { REVALIDATE } from '@lib/constants'; - -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; -import { getSongAlbumsListPageData } from '@containers/song/albums/__generated__/list'; +} from '~containers/song/albums/list'; +import { REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default StoryAlbumsList; diff --git a/src/pages/[language]/songs/book/[book].tsx b/src/pages/[language]/songs/book/[book].tsx index 04802c2ff..374faff8e 100644 --- a/src/pages/[language]/songs/book/[book].tsx +++ b/src/pages/[language]/songs/book/[book].tsx @@ -5,17 +5,16 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; +import { IBaseProps } from '~containers/base'; +import { getSongBooksDetailPageData } from '~containers/song/books/__generated__/detail'; import SongBookDetail, { SongBooksDetailProps, -} from '@containers/song/books/detail'; -import { BIBLE_BOOKS, REVALIDATE } from '@lib/constants'; - -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; -import { getSongBooksDetailPageData } from '@containers/song/books/__generated__/detail'; +} from '~containers/song/books/detail'; +import { BIBLE_BOOKS, REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default SongBookDetail; diff --git a/src/pages/[language]/songs/book/[book]/[id]/[[...slugs]].ts b/src/pages/[language]/songs/book/[book]/[id]/[[...slugs]].ts index 5a01f2409..b0bad0d81 100644 --- a/src/pages/[language]/songs/book/[book]/[id]/[[...slugs]].ts +++ b/src/pages/[language]/songs/book/[book]/[id]/[[...slugs]].ts @@ -4,14 +4,13 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; +import { IBaseProps } from '~containers/base'; +import { getBookSongDetailData } from '~containers/song/books/__generated__/track'; import SongBookTrack, { SongBookTrackProps, -} from '@containers/song/books/track'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; - -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getBookSongDetailData } from '@containers/song/books/__generated__/track'; +} from '~containers/song/books/track'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; export default SongBookTrack; diff --git a/src/pages/[language]/sponsors/[id]/[[...slugs]].tsx b/src/pages/[language]/sponsors/[id]/[[...slugs]].tsx index b02ea8475..27c90b2df 100644 --- a/src/pages/[language]/sponsors/[id]/[[...slugs]].tsx +++ b/src/pages/[language]/sponsors/[id]/[[...slugs]].tsx @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import SponsorDetail, { SponsorDetailProps } from '@containers/sponsor/detail'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; +import { IBaseProps } from '~containers/base'; import { getSponsorDetailPageData, getSponsorDetailPathsData, -} from '@containers/sponsor/__generated__/detail'; +} from '~containers/sponsor/__generated__/detail'; +import SponsorDetail, { SponsorDetailProps } from '~containers/sponsor/detail'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default SponsorDetail; diff --git a/src/pages/[language]/sponsors/[id]/conferences/page/[i].tsx b/src/pages/[language]/sponsors/[id]/conferences/page/[i].tsx index dc4eb1f6f..3cbf2e161 100644 --- a/src/pages/[language]/sponsors/[id]/conferences/page/[i].tsx +++ b/src/pages/[language]/sponsors/[id]/conferences/page/[i].tsx @@ -4,16 +4,16 @@ import { GetStaticPropsResult, } from 'next'; -import SponsorConferences, { - SponsorConferencesProps, -} from '@containers/sponsor/conferences'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import getIntl from '@lib/getIntl'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; import { getSponsorConferencesPageData, getSponsorConferencesPathsData, -} from '@containers/sponsor/__generated__/conferences'; +} from '~containers/sponsor/__generated__/conferences'; +import SponsorConferences, { + SponsorConferencesProps, +} from '~containers/sponsor/conferences'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import getIntl from '~lib/getIntl'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default SponsorConferences; diff --git a/src/pages/[language]/sponsors/[id]/series/page/[i].tsx b/src/pages/[language]/sponsors/[id]/series/page/[i].tsx index 93eec6463..d3c9dbe0b 100644 --- a/src/pages/[language]/sponsors/[id]/series/page/[i].tsx +++ b/src/pages/[language]/sponsors/[id]/series/page/[i].tsx @@ -4,14 +4,14 @@ import { GetStaticPropsResult, } from 'next'; -import SponsorSeries, { SponsorSeriesProps } from '@containers/sponsor/series'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import getIntl from '@lib/getIntl'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; import { getSponsorSeriesPageData, getSponsorSeriesPathsData, -} from '@containers/sponsor/__generated__/series'; +} from '~containers/sponsor/__generated__/series'; +import SponsorSeries, { SponsorSeriesProps } from '~containers/sponsor/series'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import getIntl from '~lib/getIntl'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default SponsorSeries; diff --git a/src/pages/[language]/sponsors/[id]/teachings/feed.xml/index.ts b/src/pages/[language]/sponsors/[id]/teachings/feed.xml/index.ts index acea7bb2b..4e407d1b7 100644 --- a/src/pages/[language]/sponsors/[id]/teachings/feed.xml/index.ts +++ b/src/pages/[language]/sponsors/[id]/teachings/feed.xml/index.ts @@ -1,9 +1,9 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; -import { generateFeed, sendRSSHeaders } from '@lib/generateFeed'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; -import { getSponsorTeachingsFeedData } from '@containers/sponsor/__generated__/teachings'; +import { getSponsorTeachingsFeedData } from '~containers/sponsor/__generated__/teachings'; +import { generateFeed, sendRSSHeaders } from '~lib/generateFeed'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default (): void => void 0; diff --git a/src/pages/[language]/sponsors/[id]/teachings/page/[i].tsx b/src/pages/[language]/sponsors/[id]/teachings/page/[i].tsx index 188aafb94..889c11087 100644 --- a/src/pages/[language]/sponsors/[id]/teachings/page/[i].tsx +++ b/src/pages/[language]/sponsors/[id]/teachings/page/[i].tsx @@ -4,16 +4,16 @@ import { GetStaticPropsResult, } from 'next'; -import SponsorTeachings, { - SponsorTeachingsProps, -} from '@containers/sponsor/teachings'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import getIntl from '@lib/getIntl'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; import { getSponsorTeachingsPageData, getSponsorTeachingsPathsData, -} from '@containers/sponsor/__generated__/teachings'; +} from '~containers/sponsor/__generated__/teachings'; +import SponsorTeachings, { + SponsorTeachingsProps, +} from '~containers/sponsor/teachings'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import getIntl from '~lib/getIntl'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default SponsorTeachings; diff --git a/src/pages/[language]/sponsors/all.tsx b/src/pages/[language]/sponsors/all.tsx index b922384c3..845c7c6e6 100644 --- a/src/pages/[language]/sponsors/all.tsx +++ b/src/pages/[language]/sponsors/all.tsx @@ -1,18 +1,19 @@ -import { - getSponsorListLetterCounts, - GetSponsorListLetterCountsQuery, -} from '@containers/sponsor/list/__generated__/list'; -import Sponsors from '@containers/sponsor/list/all'; -import { REVALIDATE } from '@lib/constants'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; import { GetStaticPathsResult, GetStaticPropsContext, GetStaticPropsResult, } from 'next'; +import { + getSponsorListLetterCounts, + GetSponsorListLetterCountsQuery, +} from '~containers/sponsor/list/__generated__/list'; +import Sponsors from '~containers/sponsor/list/all'; +import { REVALIDATE } from '~lib/constants'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; + export default Sponsors; export async function getStaticProps({ diff --git a/src/pages/[language]/sponsors/letter/[letter].tsx b/src/pages/[language]/sponsors/letter/[letter].tsx index 4ba5f3b5c..633d7f284 100644 --- a/src/pages/[language]/sponsors/letter/[letter].tsx +++ b/src/pages/[language]/sponsors/letter/[letter].tsx @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import Sponsors, { SponsorsProps } from '@containers/sponsor/list/letter'; -import { LANGUAGES, REVALIDATE } from '@lib/constants'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import root from '@lib/routes'; -import { getSponsorListLetterPageData } from '@containers/sponsor/list/__generated__/letter'; -import { Language } from '@src/__generated__/graphql'; -import { getSponsorListLetterCounts } from '@containers/sponsor/list/__generated__/list'; +import { IBaseProps } from '~containers/base'; +import { getSponsorListLetterPageData } from '~containers/sponsor/list/__generated__/letter'; +import { getSponsorListLetterCounts } from '~containers/sponsor/list/__generated__/list'; +import Sponsors, { SponsorsProps } from '~containers/sponsor/list/letter'; +import { LANGUAGES, REVALIDATE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import root from '~lib/routes'; +import { Language } from '~src/__generated__/graphql'; export default Sponsors; diff --git a/src/pages/[language]/stories/[id]/[[...slugs]].tsx b/src/pages/[language]/stories/[id]/[[...slugs]].tsx index 29faf124c..c84e82fa0 100644 --- a/src/pages/[language]/stories/[id]/[[...slugs]].tsx +++ b/src/pages/[language]/stories/[id]/[[...slugs]].tsx @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import Story, { StoryDetailProps } from '@containers/story/detail'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; +import { IBaseProps } from '~containers/base'; import { getStoryDetailData, getStoryDetailStaticPaths, -} from '@containers/story/__generated__/detail'; +} from '~containers/story/__generated__/detail'; +import Story, { StoryDetailProps } from '~containers/story/detail'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default Story; diff --git a/src/pages/[language]/stories/albums/[id]/[[...slugs]].tsx b/src/pages/[language]/stories/albums/[id]/[[...slugs]].tsx index 8a0abb116..8235e0ed7 100644 --- a/src/pages/[language]/stories/albums/[id]/[[...slugs]].tsx +++ b/src/pages/[language]/stories/albums/[id]/[[...slugs]].tsx @@ -4,17 +4,17 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import StoryAlbumDetail, { - StoryAlbumDetailProps, -} from '@containers/story/albums/detail'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; +import { IBaseProps } from '~containers/base'; import { getStoryAlbumDetailPageData, getStoryAlbumDetailPathsData, -} from '@containers/story/albums/__generated__/detail'; +} from '~containers/story/albums/__generated__/detail'; +import StoryAlbumDetail, { + StoryAlbumDetailProps, +} from '~containers/story/albums/detail'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default StoryAlbumDetail; diff --git a/src/pages/[language]/stories/albums/[id]/feed.xml/index.ts b/src/pages/[language]/stories/albums/[id]/feed.xml/index.ts index f8a975b64..a9323e60e 100644 --- a/src/pages/[language]/stories/albums/[id]/feed.xml/index.ts +++ b/src/pages/[language]/stories/albums/[id]/feed.xml/index.ts @@ -1,9 +1,9 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; -import { generateFeed, sendRSSHeaders } from '@lib/generateFeed'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; -import { formatBooksDescription } from '@pages/[language]/books/[id]/feed.xml'; -import { getStoryAlbumFeedData } from '@containers/story/albums/__generated__/detail'; +import { getStoryAlbumFeedData } from '~containers/story/albums/__generated__/detail'; +import { generateFeed, sendRSSHeaders } from '~lib/generateFeed'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; +import { formatBooksDescription } from '~pages/[language]/books/[id]/feed.xml'; export default (): void => void 0; diff --git a/src/pages/[language]/stories/albums/page/[i].tsx b/src/pages/[language]/stories/albums/page/[i].tsx index 1e0e8599d..aac756022 100644 --- a/src/pages/[language]/stories/albums/page/[i].tsx +++ b/src/pages/[language]/stories/albums/page/[i].tsx @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import StoryAlbumsList, { - StoryAlbumsListProps, -} from '@containers/story/albums/list'; -import { getNumberedStaticPaths } from '@lib/getNumberedStaticPaths'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; import { getStoriesAlbumsPageData, getStoriesAlbumsPathData, -} from '@containers/story/albums/__generated__/list'; +} from '~containers/story/albums/__generated__/list'; +import StoryAlbumsList, { + StoryAlbumsListProps, +} from '~containers/story/albums/list'; +import { getNumberedStaticPaths } from '~lib/getNumberedStaticPaths'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default StoryAlbumsList; diff --git a/src/pages/[language]/teachings/[id]/[[...slug]].ts b/src/pages/[language]/teachings/[id]/[[...slug]].ts index ba9483602..daf59b7b6 100644 --- a/src/pages/[language]/teachings/[id]/[[...slug]].ts +++ b/src/pages/[language]/teachings/[id]/[[...slug]].ts @@ -5,15 +5,15 @@ import { } from 'next'; import striptags from 'striptags'; -import { IBaseProps } from '@containers/base'; -import SermonDetail, { SermonDetailProps } from '@containers/sermon/detail'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; -import { getDetailStaticPaths } from '@lib/getDetailStaticPaths'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; +import { IBaseProps } from '~containers/base'; import { getSermonDetailData, getSermonDetailStaticPaths, -} from '@containers/sermon/__generated__/detail'; +} from '~containers/sermon/__generated__/detail'; +import SermonDetail, { SermonDetailProps } from '~containers/sermon/detail'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import { getDetailStaticPaths } from '~lib/getDetailStaticPaths'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; export default SermonDetail; diff --git a/src/pages/[language]/teachings/all/feed.xml/index.ts b/src/pages/[language]/teachings/all/feed.xml/index.ts index 20f304fff..ba9601d98 100644 --- a/src/pages/[language]/teachings/all/feed.xml/index.ts +++ b/src/pages/[language]/teachings/all/feed.xml/index.ts @@ -1,12 +1,11 @@ import { GetServerSidePropsContext, GetServerSidePropsResult } from 'next'; -import { LANGUAGES } from '@lib/constants'; - -import { generateFeed, sendRSSHeaders } from '@lib/generateFeed'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRouteOrLegacyRoute } from '@lib/getLanguageIdByRouteOrLegacyRoute'; -import root from '@lib/routes'; -import { getSermonListFeedData } from '@containers/sermon/__generated__/list'; +import { getSermonListFeedData } from '~containers/sermon/__generated__/list'; +import { LANGUAGES } from '~lib/constants'; +import { generateFeed, sendRSSHeaders } from '~lib/generateFeed'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRouteOrLegacyRoute } from '~lib/getLanguageIdByRouteOrLegacyRoute'; +import root from '~lib/routes'; export default (): void => void 0; diff --git a/src/pages/[language]/teachings/all/page/[i].tsx b/src/pages/[language]/teachings/all/page/[i].tsx index c09b8e92a..f7e078c3b 100644 --- a/src/pages/[language]/teachings/all/page/[i].tsx +++ b/src/pages/[language]/teachings/all/page/[i].tsx @@ -4,16 +4,16 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import SermonList, { SermonListProps } from '@containers/sermon/list'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getNumberedStaticPaths } from '@lib/getNumberedStaticPaths'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; +import { IBaseProps } from '~containers/base'; import { getSermonListPageData, getSermonListPagePathsData, -} from '@containers/sermon/__generated__/list'; +} from '~containers/sermon/__generated__/list'; +import SermonList, { SermonListProps } from '~containers/sermon/list'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getNumberedStaticPaths } from '~lib/getNumberedStaticPaths'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default SermonList; diff --git a/src/pages/[language]/teachings/audio/page/[i].tsx b/src/pages/[language]/teachings/audio/page/[i].tsx index bdc72cdfe..24f2c3d6b 100644 --- a/src/pages/[language]/teachings/audio/page/[i].tsx +++ b/src/pages/[language]/teachings/audio/page/[i].tsx @@ -4,16 +4,16 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import SermonList, { SermonListProps } from '@containers/sermon/list'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getNumberedStaticPaths } from '@lib/getNumberedStaticPaths'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; +import { IBaseProps } from '~containers/base'; import { getSermonListPageData, getSermonListPagePathsData, -} from '@containers/sermon/__generated__/list'; +} from '~containers/sermon/__generated__/list'; +import SermonList, { SermonListProps } from '~containers/sermon/list'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getNumberedStaticPaths } from '~lib/getNumberedStaticPaths'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default SermonList; diff --git a/src/pages/[language]/teachings/trending/all.ts b/src/pages/[language]/teachings/trending/all.ts index 0c9dda6e7..0f3f78e56 100644 --- a/src/pages/[language]/teachings/trending/all.ts +++ b/src/pages/[language]/teachings/trending/all.ts @@ -4,16 +4,16 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import TrendingTeachings from '@containers/sermon/trending'; -import { TrendingTeachingsProps } from '@containers/sermon/trending'; -import { REVALIDATE, REVALIDATE_FAILURE } from '@lib/constants'; - -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; -import { getTrendingTeachingsPageData } from '@containers/sermon/__generated__/trending'; +import { IBaseProps } from '~containers/base'; +import { getTrendingTeachingsPageData } from '~containers/sermon/__generated__/trending'; +import TrendingTeachings, { + TrendingTeachingsProps, +} from '~containers/sermon/trending'; +import { REVALIDATE, REVALIDATE_FAILURE } from '~lib/constants'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; export default TrendingTeachings; diff --git a/src/pages/[language]/teachings/trending/audio.ts b/src/pages/[language]/teachings/trending/audio.ts index e3988dc65..88edb9d24 100644 --- a/src/pages/[language]/teachings/trending/audio.ts +++ b/src/pages/[language]/teachings/trending/audio.ts @@ -4,11 +4,12 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import TrendingTeachings from '@containers/sermon/trending'; -import { TrendingTeachingsProps } from '@containers/sermon/trending'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; +import { IBaseProps } from '~containers/base'; +import TrendingTeachings, { + TrendingTeachingsProps, +} from '~containers/sermon/trending'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; import { trendingStaticProps } from './all'; diff --git a/src/pages/[language]/teachings/trending/video.ts b/src/pages/[language]/teachings/trending/video.ts index 9891b0790..3b9280425 100644 --- a/src/pages/[language]/teachings/trending/video.ts +++ b/src/pages/[language]/teachings/trending/video.ts @@ -4,11 +4,12 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import TrendingTeachings from '@containers/sermon/trending'; -import { TrendingTeachingsProps } from '@containers/sermon/trending'; -import { getLanguageRoutes } from '@lib/getLanguageRoutes'; -import root from '@lib/routes'; +import { IBaseProps } from '~containers/base'; +import TrendingTeachings, { + TrendingTeachingsProps, +} from '~containers/sermon/trending'; +import { getLanguageRoutes } from '~lib/getLanguageRoutes'; +import root from '~lib/routes'; import { trendingStaticProps } from './all'; diff --git a/src/pages/[language]/teachings/video/page/[i].tsx b/src/pages/[language]/teachings/video/page/[i].tsx index 2e6e685c7..0531fb89d 100644 --- a/src/pages/[language]/teachings/video/page/[i].tsx +++ b/src/pages/[language]/teachings/video/page/[i].tsx @@ -4,16 +4,16 @@ import { GetStaticPropsResult, } from 'next'; -import { IBaseProps } from '@containers/base'; -import SermonList, { SermonListProps } from '@containers/sermon/list'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getNumberedStaticPaths } from '@lib/getNumberedStaticPaths'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; +import { IBaseProps } from '~containers/base'; import { getSermonListPageData, getSermonListPagePathsData, -} from '@containers/sermon/__generated__/list'; +} from '~containers/sermon/__generated__/list'; +import SermonList, { SermonListProps } from '~containers/sermon/list'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getNumberedStaticPaths } from '~lib/getNumberedStaticPaths'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default SermonList; diff --git a/src/pages/[language]/testimonies/page/[i].tsx b/src/pages/[language]/testimonies/page/[i].tsx index 8a1c9e461..d077e8f7c 100644 --- a/src/pages/[language]/testimonies/page/[i].tsx +++ b/src/pages/[language]/testimonies/page/[i].tsx @@ -4,15 +4,15 @@ import { GetStaticPropsResult, } from 'next'; -import Testimonies, { TestimoniesProps } from '@containers/testimonies'; -import getIntl from '@lib/getIntl'; -import { getLanguageIdByRoute } from '@lib/getLanguageIdByRoute'; -import { getNumberedStaticPaths } from '@lib/getNumberedStaticPaths'; -import { getPaginatedStaticProps } from '@lib/getPaginatedStaticProps'; import { getTestimoniesPageData, getTestimoniesPathsData, -} from '@containers/__generated__/testimonies'; +} from '~containers/__generated__/testimonies'; +import Testimonies, { TestimoniesProps } from '~containers/testimonies'; +import getIntl from '~lib/getIntl'; +import { getLanguageIdByRoute } from '~lib/getLanguageIdByRoute'; +import { getNumberedStaticPaths } from '~lib/getNumberedStaticPaths'; +import { getPaginatedStaticProps } from '~lib/getPaginatedStaticProps'; export default Testimonies; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 04aaae516..cecd01a09 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,4 +1,5 @@ -import Base from '@containers/base'; import '../styles/styles.scss'; +import Base from '~containers/base'; + export default Base; diff --git a/src/pages/api/download/[[...slugs]].ts b/src/pages/api/download/[[...slugs]].ts index 4a6e1c6f2..fe1b8fcf3 100644 --- a/src/pages/api/download/[[...slugs]].ts +++ b/src/pages/api/download/[[...slugs]].ts @@ -1,7 +1,7 @@ import type { NextApiRequest, NextApiResponse } from 'next'; import forge from 'node-forge'; -import { getSessionToken } from '@lib/cookies'; +import { getSessionToken } from '~lib/cookies'; export default function handler(req: NextApiRequest, res: NextApiResponse) { const path = (req.query.slugs as string[]) diff --git a/src/types/next-router.d.ts b/src/types/next-router.d.ts index 7d77f21e0..a7d3fb2d4 100644 --- a/src/types/next-router.d.ts +++ b/src/types/next-router.d.ts @@ -1,6 +1,5 @@ -import { ParsedUrlQuery } from 'querystring'; - import _ from 'next/router'; +import { ParsedUrlQuery } from 'querystring'; declare module 'next/router' { declare const __mockedRouter: NextRouter; diff --git a/testSetup.ts b/testSetup.ts index b20c128ab..d8d472608 100644 --- a/testSetup.ts +++ b/testSetup.ts @@ -1,14 +1,15 @@ import '@testing-library/jest-dom/extend-expect'; import 'jest-canvas-mock'; + import { resetAllWhenMocks } from 'jest-when'; -jest.mock('@lib/api/fetchApi'); +jest.mock('~lib/api/fetchApi'); jest.mock('video.js'); jest.mock('@silvermine/videojs-airplay'); jest.mock('@silvermine/videojs-chromecast'); jest.mock('next/image'); jest.mock('next/legacy/image'); -jest.mock('@lib/getIntlMessages'); +jest.mock('~lib/getIntlMessages'); // WORKAROUND: https://github.com/keppelen/react-facebook-login/issues/217#issuecomment-375652793 beforeAll(() => { diff --git a/tsconfig.json b/tsconfig.json index a30980e41..ef11cf5c2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,12 +23,12 @@ "resolveJsonModule": true, "isolatedModules": true, "paths": { - "@src/*": ["src/*"], - "@lib/*": ["src/lib/*"], - "@components/*": ["src/components/*"], - "@containers/*": ["src/containers/*"], - "@pages/*": ["src/pages/*"], - "@public/*": ["public/*"] + "~src/*": ["src/*"], + "~lib/*": ["src/lib/*"], + "~components/*": ["src/components/*"], + "~containers/*": ["src/containers/*"], + "~pages/*": ["src/pages/*"], + "~public/*": ["public/*"] }, "incremental": true },