We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59fd0a6 commit fcf5e85Copy full SHA for fcf5e85
hackathon/spacecraft/src/components/StarshipCard.tsx
@@ -1,4 +1,3 @@
1
-import * as React from "react";
2
import CurrencyFormat from "react-currency-format";
3
import { Alert, StyleSheet } from "react-native";
4
import { Button, Card, Text } from "react-native-paper";
@@ -25,9 +24,7 @@ interface StarshipDetailsScreenParams {
25
24
}
26
27
export const StarshipCard = ({ ship, index }: StarshipCardProps) => {
28
- const title = ship.name;
29
- const price = ship.cost_in_credits;
30
- const { manufacturer } = ship;
+ const { name: title, cost_in_credits: price, manufacturer } = ship;
31
32
const source = useImage(title);
33
0 commit comments