Skip to content

Commit

Permalink
Improves styling for search input
Browse files Browse the repository at this point in the history
  • Loading branch information
dremendes committed Dec 17, 2022
1 parent e3b7f35 commit f6dc85c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pages/launches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,16 @@ export default function Launches() {
placeholder="Search by mission name"
value={search}
onChange={(event) => setSearch(event.target.value)}
flexWrap="wrap"
width='550px'
alignSelf='center'
display='block'
margin='20px auto'
/>
<Flex align="center" justify="center" flexWrap="wrap">
{uniqueLaunches?.filter((launch: launch) =>
launch.mission_name.toLowerCase().includes(search.toLowerCase())
).map((launch: launch) => (
{uniqueLaunches?.filter((launch: launch) =>
launch.mission_name.toLowerCase().includes(search.toLowerCase())
).map((launch: launch) => (
<Card key={launch.id}>
<CardHeader>
<Heading size='md'>Mission: {launch.mission_name.length >= 15 ? (launch.mission_name.slice(0,13) + '...') : launch.mission_name }</Heading>
Expand Down

0 comments on commit f6dc85c

Please sign in to comment.