Skip to content

Commit

Permalink
Rename Song to Track
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick91 committed Mar 5, 2024
1 parent 64d67be commit 938a365
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Playbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { fragmentRegistry } from '../apollo/fragmentRegistry';
import Skeleton from './Skeleton';
import LikeButton from './LikeButton';
import { withHighlight } from './LoadingStateHighlighter';
import SongQuiz from './SongQuiz';
import TrackQuiz from './TrackQuiz';

const EPISODE_SKIP_FORWARD_AMOUNT = 15_000;

Expand Down Expand Up @@ -128,7 +128,7 @@ const Playbar = () => {
context={playbackState?.context ?? null}
track={playbackItem}
/>
<SongQuiz id={playbackItem.id} />
<TrackQuiz id={playbackItem.id} />
</>
) : playbackItem?.__typename === 'Episode' ? (
<EpisodePlaybackDetails episode={playbackItem} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import { X, Pizza } from 'lucide-react';
import {
QueryReference,
gql,
useBackgroundQuery,
useLoadableQuery,
useReadQuery,
useSuspenseQuery,
} from '@apollo/client';
import { Suspense, useState } from 'react';
import cx from 'classnames';
Expand All @@ -16,8 +14,8 @@ import cx from 'classnames';
// CurrentUserQuery,
// CurrentUserQueryVariables
// >
const SONG_QUIZ_QUERY = gql`
query SongQuiz($trackId: ID!) {
const QUIZ_QUERY = gql`
query TrackQuiz($trackId: ID!) {
track(id: $trackId) {
quiz {
question
Expand All @@ -31,8 +29,8 @@ const SONG_QUIZ_QUERY = gql`
}
`;

const SongQuiz = ({ id }: { id: string }) => {
const [loadQuiz, queryRef] = useLoadableQuery(SONG_QUIZ_QUERY);
const TrackQuiz = ({ id }: { id: string }) => {
const [loadQuiz, queryRef] = useLoadableQuery(QUIZ_QUERY);

return (
<QuizDialog id={id} queryRef={queryRef}>
Expand All @@ -47,7 +45,7 @@ const SongQuiz = ({ id }: { id: string }) => {
);
};

export default SongQuiz;
export default TrackQuiz;

const QuizDialog = ({
id,
Expand Down

0 comments on commit 938a365

Please sign in to comment.