Open jiyanpatil07 opened 6 days ago
I'm going to follow the following steps to help you solve the GitHub issue:
Here are the changes we decided to make. I'm done making edits and now I'm just validating the changes using a linter to catch any mistakes like syntax errors or undefined variables:
pages/index.tsx
Change the grid layout for the launch cards on large screens to have 4 columns instead of 3 columns.
---
+++
@@ -1,6 +1,6 @@
{/* Right-hand side for cards */}
<div className="w-full sm:w-3/4 p-6 ">
- <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
{filteredLaunches.map((launch:any) => (
<LaunchCard key={launch.flight_number} launch={launch} />
))}
pages/index.tsx
Adjust the width of the LaunchCard component to fit the new 4-column layout on large screens.
---
+++
@@ -1,11 +1,11 @@
function LaunchCard({ launch }: { launch: any }) {
return (
- <div className="max-w-md bg-white border border-gray-300 rounded-lg shadow-lg dark:bg-gray-800 dark:border-gray-700">
-
+ <div className="max-w-sm bg-white border border-gray-300 rounded-lg shadow-lg dark:bg-gray-800 dark:border-gray-700">
+
<a href={launch.links.article_link} target="_blank" rel="noopener noreferrer"/>
- <Image className="rounded-t-lg"
- width={400}
- height={400}
+ <Image className="rounded-t-lg"
+ width={300}
+ height={300}
loading="lazy"
src={launch.links.mission_patch} alt={launch.mission_name} />
{/* </Link> */}
Your changes have been successfully made to the branch sweep/grid_for_cards_has_3_columns_make_it_4_c
. I have validated these changes using a syntax checker and a linter.
[!TIP] To recreate the pull request, edit the issue title or description.
Thank You.
Grid for cards has 3 columns make it 4 column