Skip to content

Commit

Permalink
store selected bible version in local storage
Browse files Browse the repository at this point in the history
  • Loading branch information
narthur committed Dec 4, 2024
1 parent 8d3fb7d commit 7b68db5
Show file tree
Hide file tree
Showing 62 changed files with 156 additions and 67 deletions.
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 '~src/lib/hooks/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/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 '~src/lib/hooks/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 '~src/lib/hooks/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: 2 additions & 2 deletions src/components/molecules/buttonPlayCircle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React, { useContext } from 'react';
import { FormattedMessage, useIntl } from 'react-intl';

import { BaseColors } from '~lib/constants';
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 SuccessIcon from '~public/img/icons/icon-success-light.svg';
import IconPlay from '~public/img/icons/play-circle.svg';
import { useFormattedDuration } from '~src/lib/time';

import Heading6 from '../atoms/heading6';
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 '~src/lib/hooks/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/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 '~src/lib/hooks/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
2 changes: 1 addition & 1 deletion 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 { SequenceContentType } from '~src/__generated__/graphql';
import useHover from '~src/lib/hooks/useHover';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import { SequenceContentType } from '~src/__generated__/graphql';

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 '~src/lib/hooks/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/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 '~src/lib/hooks/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/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 root from '~src/lib/routes';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import root from '~src/lib/routes';

import Button from './buttonSocial';
import SocialLogin from './socialLogin';
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 '~src/lib/hooks/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 '~src/lib/hooks/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/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 '~src/lib/hooks/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/organisms/cardSlider/section/audiobooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardSequenceFragment } from '~src/components/molecules/card/__generated__/sequence';
import CardSequence from '~src/components/molecules/card/sequence';
import root from '~src/lib/routes';
import { useLanguageId } from '~src/lib/hooks/useLanguageId';
import root from '~src/lib/routes';

import { useInfiniteGetSectionAudiobooksQuery } from './__generated__/audiobooks';
import Section from './index';
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/cardSlider/section/bibleBooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardSequenceFragment } from '~src/components/molecules/card/__generated__/sequence';
import CardSequence from '~src/components/molecules/card/sequence';
import root from '~src/lib/routes';
import { useLanguageId } from '~src/lib/hooks/useLanguageId';
import root from '~src/lib/routes';

import Section from '.';
import { useInfiniteGetSectionBibleBooksQuery } from './__generated__/bibleBooks';
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/cardSlider/section/blogPosts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardPostFragment } from '~src/components/molecules/card/__generated__/post';
import CardPost from '~src/components/molecules/card/post';
import root from '~src/lib/routes';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import root from '~src/lib/routes';

import Section from '.';
import { useInfiniteGetSectionBlogPostsQuery } from './__generated__/blogPosts';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { ConferencePersonFragment } from '~src/components/molecules/card/__generated__/conferencePerson';
import CardPerson from '~src/components/molecules/card/person';
import root from '~src/lib/routes';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import root from '~src/lib/routes';

import Section from '.';
import { useInfiniteGetSectionConferencePresentersQuery } from './__generated__/conferencePresenters';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardSequenceFragment } from '~src/components/molecules/card/__generated__/sequence';
import CardSequence from '~src/components/molecules/card/sequence';
import root from '~src/lib/routes';
import { useLanguageId } from '~src/lib/hooks/useLanguageId';
import root from '~src/lib/routes';

import Section from '.';
import { useInfiniteGetSectionConferenceSeriesQuery } from './__generated__/conferenceSeries';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardRecordingFragment } from '~src/components/molecules/card/__generated__/recording';
import CardRecording from '~src/components/molecules/card/recording';
import root from '~src/lib/routes';
import { useLanguageId } from '~src/lib/hooks/useLanguageId';
import root from '~src/lib/routes';

import Section from '.';
import { useInfiniteGetSectionConferenceTeachingsQuery } from './__generated__/conferenceTeachings';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { useCallback } from 'react';
import { useIntl } from 'react-intl';

import CardCollection from '~src/components/molecules/card/collection';
import root from '~src/lib/routes';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import root from '~src/lib/routes';

import {
GetSectionConferencesQuery,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardSequenceFragment } from '~src/components/molecules/card/__generated__/sequence';
import CardSequence from '~src/components/molecules/card/sequence';
import root from '~src/lib/routes';
import { useLanguageId } from '~src/lib/hooks/useLanguageId';
import root from '~src/lib/routes';

import { useInfiniteGetSectionEgwAudiobooksQuery } from './__generated__/egwAudiobooks';
import Section from './index';
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/cardSlider/section/presenters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardPersonFragment } from '~src/components/molecules/card/__generated__/person';
import CardPerson from '~src/components/molecules/card/person';
import root from '~src/lib/routes';
import { useLanguageId } from '~src/lib/hooks/useLanguageId';
import root from '~src/lib/routes';

import Section from '.';
import { useInfiniteGetSectionPresentersQuery } from './__generated__/presenters';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardRecordingFragment } from '~src/components/molecules/card/__generated__/recording';
import CardRecording from '~src/components/molecules/card/recording';
import root from '~src/lib/routes';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import root from '~src/lib/routes';

import { useInfiniteGetSectionRecentTeachingsQuery } from './__generated__/recentTeachings';
import Section from './index';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardSequenceFragment } from '~src/components/molecules/card/__generated__/sequence';
import CardSequence from '~src/components/molecules/card/sequence';
import root from '~src/lib/routes';
import { useLanguageId } from '~src/lib/hooks/useLanguageId';
import root from '~src/lib/routes';

import Section from '.';
import { useInfiniteGetSectionScriptureSongsQuery } from './__generated__/scriptureSongs';
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/cardSlider/section/series.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardSequenceFragment } from '~src/components/molecules/card/__generated__/sequence';
import CardSequence from '~src/components/molecules/card/sequence';
import root from '~src/lib/routes';
import { useLanguageId } from '~src/lib/hooks/useLanguageId';
import root from '~src/lib/routes';

import Section from '.';
import { useInfiniteGetSectionSeriesQuery } from './__generated__/series';
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/cardSlider/section/sponsors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardSponsorFragment } from '~src/components/molecules/card/__generated__/sponsor';
import CardSponsor from '~src/components/molecules/card/sponsor';
import root from '~src/lib/routes';
import { useLanguageId } from '~src/lib/hooks/useLanguageId';
import root from '~src/lib/routes';

import Section from '.';
import { useInfiniteGetSectionSponsorsQuery } from './__generated__/sponsors';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react';
import { useIntl } from 'react-intl';

import CardSequence from '~src/components/molecules/card/sequence';
import root from '~src/lib/routes';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import root from '~src/lib/routes';

import {
GetSectionStorySeasonsQuery,
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/cardSlider/section/topics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardTopicFragment } from '~src/components/molecules/card/__generated__/topic';
import CardTopic from '~src/components/molecules/card/topic';
import root from '~src/lib/routes';
import { useLanguageId } from '~src/lib/hooks/useLanguageId';
import root from '~src/lib/routes';

import { useInfiniteGetSectionTopicsQuery } from './__generated__/topics';
import Section from './index';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardTopicFragment } from '~src/components/molecules/card/__generated__/topic';
import CardTopic from '~src/components/molecules/card/topic';
import root from '~src/lib/routes';
import { useLanguageId } from '~src/lib/hooks/useLanguageId';
import root from '~src/lib/routes';

import { useInfiniteGetSectionTopicsBrowseQuery } from './__generated__/topicsBrowse';
import Section from './index';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardRecordingFragment } from '~src/components/molecules/card/__generated__/recording';
import CardRecording from '~src/components/molecules/card/recording';
import root from '~src/lib/routes';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import root from '~src/lib/routes';

import Section from '.';
import { useInfiniteGetSectionTrendingMusicQuery } from './__generated__/trendingMusic';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { useIntl } from 'react-intl';

import { CardRecordingFragment } from '~src/components/molecules/card/__generated__/recording';
import CardRecording from '~src/components/molecules/card/recording';
import root from '~src/lib/routes';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import root from '~src/lib/routes';

import { useInfiniteGetSectionTrendingTeachingsQuery } from './__generated__/trendingTeachings';
import Section from './index';
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { FormattedMessage, useIntl } from 'react-intl';
import Heading3 from '~components/atoms/heading3';
import Link from '~components/atoms/linkWithoutPrefetch';
import isServerSide from '~lib/isServerSide';
import root from '~src/lib/routes';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import root from '~src/lib/routes';

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

Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/libraryNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ 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 '~src/lib/hooks/useLanguageRoute';
import IconFilter from '~public/img/icons/icon-filter-light.svg';
import IconSort from '~public/img/icons/icon-sort-light.svg';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';

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

Expand Down
4 changes: 2 additions & 2 deletions src/components/organisms/mobileHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ 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 '~src/lib/hooks/useLanguageRoute';
import { useNavigationItems } from '~src/lib/hooks/useNavigationItems';
import IconExitSmall from '~public/img/icons/icon-exit-small.svg';
import MoreIcon from '~public/img/icons/icon-more.svg';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import { useNavigationItems } from '~src/lib/hooks/useNavigationItems';

import { analytics } from '../../lib/analytics';
import OpenAppButton from '../molecules/openAppButton';
Expand Down
10 changes: 5 additions & 5 deletions src/components/organisms/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ 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 '~src/lib/hooks/useLanguageRoute';
import {
INavigationItem,
useNavigationItems,
} from '~src/lib/hooks/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 { BaseColors } from '~src/lib/constants';
import useIsAuthenticated from '~src/lib/hooks/useIsAuthenticated';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import {
INavigationItem,
useNavigationItems,
} from '~src/lib/hooks/useNavigationItems';

import { analytics } from '../../lib/analytics';
import IconButton from '../molecules/iconButton';
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/profileForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import Input from '~components/molecules/form/input';
import Modal from '~components/organisms/modal';
import { refetchUserQueries, resetUserQueries } from '~src/lib/api/login';
import { clearSessionToken } from '~src/lib/cookies';
import root from '~src/lib/routes';
import useLanguageRoute from '~src/lib/hooks/useLanguageRoute';
import root from '~src/lib/routes';

import {
useDeleteAccountMutation,
Expand Down
Loading

0 comments on commit 7b68db5

Please sign in to comment.