Skip to content

Commit fcf5e85

Browse files
committed
upate
1 parent 59fd0a6 commit fcf5e85

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

hackathon/spacecraft/src/components/StarshipCard.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as React from "react";
21
import CurrencyFormat from "react-currency-format";
32
import { Alert, StyleSheet } from "react-native";
43
import { Button, Card, Text } from "react-native-paper";
@@ -25,9 +24,7 @@ interface StarshipDetailsScreenParams {
2524
}
2625

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

3229
const source = useImage(title);
3330

0 commit comments

Comments
 (0)