Skip to content

Commit c1dac62

Browse files
committed
upate
1 parent ecba9a1 commit c1dac62

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

hackathon/spacecraft/src/components/StarshipCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ interface StarshipDetailsScreenParams {
2424
navigate: any;
2525
}
2626

27-
export const StarshipCard = ({ ship, index }: StarshipCardProps) => {
28-
const { name: title, cost_in_credits: price, manufacturer } = ship;
27+
export const StarshipCard = ({ index, ship }: StarshipCardProps) => {
28+
const { cost_in_credits: price, manufacturer, name: title } = ship;
2929

3030
const source = useImage(title);
3131

hackathon/spacecraft/src/screens/StarshipDetailsScreen.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ export const StarshipDetailsScreen = ({
3636
manufacturer,
3737
max_atmosphering_speed,
3838
model,
39+
name,
40+
passengers,
41+
starship_class,
3942
//@ts-expect-error the api does not have `image` field
4043
image,
4144
} = route.params;
@@ -53,6 +56,7 @@ export const StarshipDetailsScreen = ({
5356
const scale = useSharedValue(1);
5457

5558
const theme = useTheme();
59+
console.log("🚀 ~ theme:", theme);
5660

5761
return (
5862
<View style={{ backgroundColor: theme.colors.background }}>

0 commit comments

Comments
 (0)