From ebf426a4b49eb4be9bfc41b51d35fd4a5dee2e54 Mon Sep 17 00:00:00 2001 From: Violet Caulfield Date: Fri, 29 Nov 2024 09:38:33 -0600 Subject: [PATCH] style changes --- components/Artist/component.tsx | 12 +++-- components/Global/card.tsx | 59 +++++++++++----------- components/Global/component.config.ts | 4 +- components/Home/component.tsx | 5 +- components/Home/helpers/recent-artists.tsx | 4 +- 5 files changed, 45 insertions(+), 39 deletions(-) diff --git a/components/Artist/component.tsx b/components/Artist/component.tsx index e9eb0602..86540e47 100644 --- a/components/Artist/component.tsx +++ b/components/Artist/component.tsx @@ -4,6 +4,7 @@ import { SafeAreaView } from "react-native-safe-area-context"; import { useArtistAlbums } from "../../api/queries/artist"; import { useApiClientContext } from "../jellyfin-api-provider"; import { FlatList } from "react-native"; +import { Card } from "../Global/card"; export default function Artist({ artistId, artistName }: { artistId: string, artistName: string }): React.JSX.Element { @@ -13,7 +14,10 @@ export default function Artist({ artistId, artistName }: { artistId: string, art return ( - + { return ( - - { album.ProductionYear?.toString() ?? "" } - + + { album.Name! } + ) }} /> diff --git a/components/Global/card.tsx b/components/Global/card.tsx index 0fb1072f..90d9ff67 100644 --- a/components/Global/card.tsx +++ b/components/Global/card.tsx @@ -17,35 +17,36 @@ export function Card(props: CardProps) { const { server } = useApiClientContext(); return ( - - - { props.children && ( -

{ props.children }

- )} -
- - { props.footer && ( - props.footer - )} - - - - -
+ + + { props.children && ( +

{ props.children }

+ )} +
+ + { props.footer && ( + props.footer + )} + + + + +
) } \ No newline at end of file diff --git a/components/Global/component.config.ts b/components/Global/component.config.ts index 01718114..3c62a0a0 100644 --- a/components/Global/component.config.ts +++ b/components/Global/component.config.ts @@ -1,4 +1,4 @@ export const cardDimensions = { - width: 250, - height: 300 + width: 200, + height: 250 } \ No newline at end of file diff --git a/components/Home/component.tsx b/components/Home/component.tsx index 371938a6..61294d8a 100644 --- a/components/Home/component.tsx +++ b/components/Home/component.tsx @@ -1,6 +1,5 @@ -import { ScrollView, YStack } from "tamagui"; +import { H3, ScrollView, YStack } from "tamagui"; import _ from "lodash"; -import { H2 } from "../Global/text"; import RecentlyPlayed from "./helpers/recently-played"; import { useApiClientContext } from "../jellyfin-api-provider"; import RecentArtists from "./helpers/recent-artists"; @@ -65,7 +64,7 @@ function ProvidedHome({ route, navigation }: ProvidedHomeProps): React.JSX.Eleme /> }> -

{`Hi, ${user!.name}`}

+

{`Hi, ${user!.name}`}

diff --git a/components/Home/helpers/recent-artists.tsx b/components/Home/helpers/recent-artists.tsx index 1e8817a1..a303c75d 100644 --- a/components/Home/helpers/recent-artists.tsx +++ b/components/Home/helpers/recent-artists.tsx @@ -17,13 +17,15 @@ export default function RecentArtists({ navigation }: ProvidedHomeProps): React. ]) return ( - +

Recent Artists

{ return ( { navigation.navigate('Artist',