Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List books #601

Merged
merged 5 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 57 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
"next-pwa": "^5.6.0",
"node-forge": "^1.3.1",
"normalize.css": "^8.0.1",
"p-memoize": "^7.1.1",
"p-throttle": "^7.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-intl": "^6.6.8",
Expand Down
2 changes: 1 addition & 1 deletion src/components/HOCs/withIntl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { IntlProvider, ResolvedIntlConfig } from 'react-intl';

import getIntlMessages from '~lib/getIntlMessages';
import handleIntlError from '~lib/handleIntlError';
import useLanguageRoute from '~lib/useLanguageRoute';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';

type Messages = ResolvedIntlConfig['messages'];

Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/buttonAddToPlaylist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FormattedMessage, useIntl } from 'react-intl';

import { BaseColors } from '~src/lib/constants';
import { getSessionToken } from '~src/lib/cookies';
import useLanguageRoute from '~src/lib/useLanguageRoute';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import NewPlaylist from '~src/pages/[language]/library/playlists/new';

import AddToPlaylistIcon from '../../../public/img/icons/in-queue.svg';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/buttonDownloadBlank.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { FormattedMessage, useIntl } 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 IconDownload from '~public/img/icons/icon-download.svg';
import { BaseColors } from '~src/lib/constants';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';

import styles from './buttonDownloadBlank.module.scss';
import { isBackgroundColorDark } from './buttonPlay';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/buttonGuest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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 useLanguageRoute from '~src/lib/hooks/useLanguageRoute';

import styles from './buttonGuest.module.scss';

Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/buttonNudge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { useIntl } from 'react-intl';

import { AndMiniplayerFragment } from '~components/templates/__generated__/andMiniplayer';
import { BaseColors } from '~lib/constants';
import usePlaybackSession from '~lib/usePlaybackSession';
import IconJumpBack from '~public/img/icons/icon-jump-back.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 usePlaybackSession from '~src/lib/hooks/usePlaybackSession';

import styles from './buttonNudge.module.scss';
import { isBackgroundColorDark } from './buttonPlay';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/buttonPlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { useIntl } from 'react-intl';

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 usePlaybackSession from '~src/lib/hooks/usePlaybackSession';

import styles from './buttonPlay.module.scss';
import IconButton from './iconButton';
Expand Down
4 changes: 3 additions & 1 deletion src/components/molecules/buttonPlayCircle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import React, { useContext } from 'react';
import { FormattedMessage, useIntl } from 'react-intl';

import { BaseColors } from '~lib/constants';
import usePlaybackSession, { PlaySource } from '~lib/usePlaybackSession';
import SuccessIcon from '~public/img/icons/icon-success-light.svg';
import IconPlay from '~public/img/icons/play-circle.svg';
import usePlaybackSession, {
PlaySource,
} from '~src/lib/hooks/usePlaybackSession';
import { useFormattedDuration } from '~src/lib/time';

import Heading6 from '../atoms/heading6';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/buttonSpeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FormattedMessage } from 'react-intl';

import { AndMiniplayerFragment } from '~components/templates/__generated__/andMiniplayer';
import { BaseColors } from '~lib/constants';
import usePlaybackSession from '~lib/usePlaybackSession';
import usePlaybackSession from '~src/lib/hooks/usePlaybackSession';

import { isBackgroundColorDark } from './buttonPlay';
import styles from './buttonSpeed.module.scss';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/card/bibleBook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Heading2 from '~components/atoms/heading2';
import Heading6 from '~components/atoms/heading6';
import Link from '~components/atoms/linkWithoutPrefetch';
import root from '~lib/routes';
import useLanguageRoute from '~lib/useLanguageRoute';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import { IBibleBook } from '~src/services/fcbh/types';

import BibleVersionTypeLockup from '../bibleVersionTypeLockup';
Expand Down
4 changes: 2 additions & 2 deletions src/components/molecules/card/bibleVersion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import Heading2 from '~components/atoms/heading2';
import Heading6 from '~components/atoms/heading6';
import Link from '~components/atoms/linkWithoutPrefetch';
import root from '~lib/routes';
import useHover from '~lib/useHover';
import useLanguageRoute from '~lib/useLanguageRoute';
import useHover from '~src/lib/hooks/useHover';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import { IBibleVersion } from '~src/services/fcbh/types';

import BibleVersionTypeLockup from '../bibleVersionTypeLockup';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/card/collection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ 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 SuccessIcon from '~public/img/icons/icon-success-light.svg';
import { CollectionContentType } from '~src/__generated__/graphql';
import { analytics } from '~src/lib/analytics';
import useHover from '~src/lib/hooks/useHover';

import ButtonFavorite from '../buttonFavorite';
import CollectionTypeLockup from '../collectionTypeLockup';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/card/playlist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Heading2 from '~components/atoms/heading2';
import Heading6 from '~components/atoms/heading6';
import Link from '~components/atoms/linkWithoutPrefetch';
import root from '~lib/routes';
import useLanguageRoute from '~lib/useLanguageRoute';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';

import PlaylistTypeLockup from '../playlistTypeLockup';
import { CardPlaylistFragment } from './__generated__/playlist';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/card/sequence.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ 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 BookIcon from '~public/img/icons/fa-book-light.svg';
import FeatherIcon from '~public/img/icons/fa-feather-light.svg';
import ListIcon from '~public/img/icons/fa-list-alt.svg';
Expand All @@ -23,6 +22,7 @@ import SuccessIcon from '~public/img/icons/icon-success-light.svg';
import { SequenceContentType } from '~src/__generated__/graphql';
import NameMatcher from '~src/components/atoms/nameMatcher';
import { analytics } from '~src/lib/analytics';
import useHover from '~src/lib/hooks/useHover';

import ButtonFavorite from '../buttonFavorite';
import PersonLockup from '../personLockup';
Expand Down
4 changes: 2 additions & 2 deletions src/components/molecules/card/songBook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import Heading2 from '~components/atoms/heading2';
import Heading6 from '~components/atoms/heading6';
import Link from '~components/atoms/linkWithoutPrefetch';
import root from '~lib/routes';
import useHover from '~lib/useHover';
import useLanguageRoute from '~lib/useLanguageRoute';
import { SequenceContentType } from '~src/__generated__/graphql';
import useHover from '~src/lib/hooks/useHover';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';

import SequenceTypeLockup from '../sequenceTypeLockup';
import TeaseRecordingStack from '../teaseRecordingStack';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/helpWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ 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 useHelpScoutLabels from '~src/lib/hooks/useHelpScoutLabels';

import { Beacon } from '../../types/window';
import { useGetHelpWidgetDataQuery } from './__generated__/helpWidget';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/languageAlternativesAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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 useLanguageRoute from '~src/lib/hooks/useLanguageRoute';

import styles from './languageAlternativesAlert.module.scss';
import LanguageButton from './languageButton';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/languageButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ 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 IconDisclosure from '~public/img/icons/icon-disclosure-light-small.svg';
import IconLanguage from '~public/img/icons/icon-language-light.svg';
import { Language } from '~src/__generated__/graphql';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';

import Button, { IButtonType } from './button';
import Dropdown from './dropdown';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/loadingIndicator.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';

import LoadingIndicator from '~components/molecules/loadingIndicator';
import renderWithProviders from '~lib/test/renderWithProviders';
import useRouterLoading from '~lib/useRouterLoading';
import useRouterLoading from '~src/lib/hooks/useRouterLoading';

jest.mock('~lib/useRouterLoading');

Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/loadingIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useIsFetching } from '@tanstack/react-query';
import clsx from 'clsx';
import React, { useEffect } from 'react';

import useRouterLoading from '~lib/useRouterLoading';
import useRouterLoading from '~src/lib/hooks/useRouterLoading';

import styles from './loadingIndicator.module.scss';

Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';

import AndOnboarding from '~components/templates/andOnboarding';
import root from '~lib/routes';
import useLanguageRoute from '~lib/useLanguageRoute';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';

import LoginForm from './loginForm';
import SocialLogin from './socialLogin';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/loginLanding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { FormattedMessage, useIntl } from 'react-intl';

import Link from '~components/atoms/linkWithoutPrefetch';
import AndOnboarding from '~components/templates/andOnboarding';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import root from '~src/lib/routes';
import useLanguageRoute from '~src/lib/useLanguageRoute';

import Button from './buttonSocial';
import SocialLogin from './socialLogin';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/mediaFormatSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { FormattedMessage } from 'react-intl';

import hasVideo from '~lib/hasVideo';
import usePlaybackSession from '~lib/usePlaybackSession';
import usePlaybackSession from '~src/lib/hooks/usePlaybackSession';

import { PlayerFragment } from './__generated__/player';
import styles from './mediaFormatSwitcher.module.scss';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/navItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import React from 'react';
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 IconDisclosure from '~public/img/icons/icon-disclosure-light-small.svg';
import { INavigationItem } from '~src/lib/hooks/useNavigationItems';

import { analytics } from '../../lib/analytics';

Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import React from 'react';
import { useIntl } from 'react-intl';

import Link from '~components/atoms/linkWithoutPrefetch';
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 useLanguageRoute from '~src/lib/hooks/useLanguageRoute';

import Button from './button';
import styles from './pagination.module.scss';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/playbackTimes.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import { useFormattedTime } from '~lib/time';
import usePlaybackSession from '~lib/usePlaybackSession';
import usePlaybackSession from '~src/lib/hooks/usePlaybackSession';

import { PlayerFragment } from './__generated__/player';
import styles from './playbackTimes.module.scss';
Expand Down
4 changes: 2 additions & 2 deletions src/components/molecules/player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ 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 useGlobalSpaceDown from '~src/lib/hooks/useGlobalSpaceDown';
import useIsAuthenticated from '~src/lib/hooks/useIsAuthenticated';
import usePlaybackSession from '~src/lib/hooks/usePlaybackSession';

import { PlaybackContext } from '../templates/andPlaybackContext';
import { PlayerFragment } from './__generated__/player';
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/recordingHasVideoFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { FormattedMessage } from 'react-intl';
import Link from '~components/atoms/linkWithoutPrefetch';
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 useLanguageRoute from '~src/lib/hooks/useLanguageRoute';

import styles from './recordingHasVideoFilter.module.scss';

Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/recordingProgressBar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import { AndMiniplayerFragment } from '~components/templates/__generated__/andMiniplayer';
import usePlaybackSession from '~lib/usePlaybackSession';
import usePlaybackSession from '~src/lib/hooks/usePlaybackSession';

import ProgressBar from '../atoms/progressBar';

Expand Down
Loading
Loading