diff --git a/src/client/components/PlayData.tsx b/src/client/components/PlayData.tsx index 7945bb85..2d6e989c 100644 --- a/src/client/components/PlayData.tsx +++ b/src/client/components/PlayData.tsx @@ -97,7 +97,7 @@ export const PlayDataDataList = (props: { play: JsonPlayObject, dates: DisplayDa if (play.data.albumArtists !== undefined && play.data.albumArtists.length > 0) { albumArtistElm = ( - + Album Artists {play.data.albumArtists.map((x, index) => { @@ -119,39 +119,31 @@ export const PlayDataDataList = (props: { play: JsonPlayObject, dates: DisplayDa } = play; return ( - - - - - Title - {play.data.track} - - - Artists - - {artists.length === 0 ? (No Artists) : - {play.data.artists.map((x, index) => { - return ( - - {x} - - ); - })}} - - - {albumArtistElm} - - Album - {play.data.album} - - - - - - - - - + + + Title + {play.data.track} + + + Artists + + {artists.length === 0 ? (No Artists) : + {play.data.artists.map((x, index) => { + return ( + + {x} + + ); + })}} + + + {albumArtistElm} + + Album + {play.data.album} + + + ) } @@ -180,7 +172,7 @@ export const PlayDatesStack = (props: { play: JsonPlayObject, dates: DisplayDate dateElements.push(({`Seen ${shortTodayAwareFormat(dayjs(play.data.playDate))}`})); } datesItem = ( - + Dates diff --git a/src/stories/PlayInfo.stories.tsx b/src/stories/PlayInfo.stories.tsx index f6aaf9a5..9651d5ce 100644 --- a/src/stories/PlayInfo.stories.tsx +++ b/src/stories/PlayInfo.stories.tsx @@ -2,8 +2,9 @@ import preview from "../../.storybook/preview.js"; import React from 'react'; import { fn } from 'storybook/test'; -import { PlayData, PlayInfoContainer } from "../client/components/PlayData.js"; +import { PlayData } from "../client/components/PlayData.js"; import {Provider} from "../client/components/Provider"; +import { Container } from '@chakra-ui/react'; import { generateArtists, generateJsonPlay, generatePlay } from "../core/PlayTestUtils.js" import clone from "clone"; @@ -14,7 +15,7 @@ type PropsAndCustomArgs = React.ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export const meta = preview.type<{args: PropsAndCustomArgs}>().meta({ title: 'Examples/PlayInfo', - component: PlayInfoContainer, + component: PlayData, parameters: { // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout layout: 'padded', @@ -22,7 +23,7 @@ const meta = preview.type<{args: PropsAndCustomArgs}>().meta({ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs tags: ['autodocs'], decorators: [ - (Story) => (), + (Story) => (), ], args: { play: generateJsonPlay(), @@ -50,6 +51,6 @@ export const PlayInfoStory = meta.story({ args.final.data.albumArtists = aa; } } - return () + return () } }); \ No newline at end of file