Skip to content

[🐞] Bug : Destructuring Objects #16

@elisebeall

Description

@elisebeall

Sometimes SingleBox or Details components are being passed a 'spacecraft' object & sometimes they are being passed a 'launcher' object. These objects have different keys, so a single destructuring does not work. Currently const type = useParams().type the value assigned to type is being used to determine which return statement needs to be rendered, but it seems like extra code that could be simplified. Possible a custom hook to return the custom object?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions