fix: name a new ship's name based on the ship type (#45)
This commit is contained in:
@@ -187,13 +187,15 @@ export const ShipSnapshotProvider = (props: ShipSnapshotProps) => {
|
||||
}, []);
|
||||
|
||||
const changeHull = React.useCallback((typeId: number) => {
|
||||
const hullName = eveData?.typeIDs?.[typeId].name;
|
||||
|
||||
setCurrentFit({
|
||||
"name": "New Ship",
|
||||
"name": `New ${hullName}`,
|
||||
"description": "",
|
||||
"ship_type_id": typeId,
|
||||
"items": []
|
||||
})
|
||||
}, []);
|
||||
}, [eveData]);
|
||||
|
||||
React.useEffect(() => {
|
||||
setShipSnapshot((oldSnapshot) => ({
|
||||
|
||||
Reference in New Issue
Block a user