-
-
Notifications
You must be signed in to change notification settings - Fork 987
fix: #4065 Made Case Studies page table section mobile responsive #4403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
202f59b
fixes #4065. Made Case Studie page mobile responsive
namanjain24-sudo 314fcb6
fixes #4065. Made Case Studie page mobile responsive
namanjain24-sudo 6da310a
fix: #4381
namanjain24-sudo aa3edd2
Merge branch 'master' into master
namanjain24-sudo d6a2d0a
Merge branch 'master' into master
sambhavgupta0705 2e228ba
Merge branch 'master' into master
namanjain24-sudo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,38 +82,68 @@ export default function Casestudies() { | |
| </div> | ||
| </div> | ||
|
|
||
| <center> | ||
| <div className='overflow-x-auto'> | ||
| <table className='my-8 w-full max-w-full border-collapse border'> | ||
| <thead> | ||
| <tr> | ||
| <th className='border p-2 font-bold'>Company name</th> | ||
| <th className='border-2 p-2 font-bold'>Use Case</th> | ||
| <th className='border-2 p-2 font-bold'>Resources</th> | ||
| {/* Desktop Table View */} | ||
| <div className='hidden md:block overflow-x-auto'> | ||
| <table className='my-8 w-full border-collapse border table-auto'> | ||
| <thead> | ||
| <tr> | ||
| <th className='border p-2 font-bold'>Company name</th> | ||
| <th className='border-2 p-2 font-bold'>Use Case</th> | ||
| <th className='border-2 p-2 font-bold'>Resources</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| {AdoptersList.map((entry: Adopter, index: number) => ( | ||
| <tr key={index} data-testid='Adopters'> | ||
| <td className='border-2 p-2'>{entry.companyName}</td> | ||
| <td className='border-2 p-2'>{entry.useCase}</td> | ||
| <td className='border-2 p-2'> | ||
| <ul className='space-y-1'> | ||
| {entry.resources.map((resource: Resource, resourceIndex: number) => ( | ||
| <li key={resourceIndex}> | ||
| <a className='text-cyan-500 underline hover:text-cyan-600' href={resource.link}> | ||
| {resource.title} | ||
| </a> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| </td> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| {AdoptersList.map((entry: Adopter, index: number) => ( | ||
| <tr key={index} data-testid='Adopters'> | ||
| <td className='border-2 p-2'>{entry.companyName}</td> | ||
| <td className='border-2 p-2'>{entry.useCase}</td> | ||
| <td className='border-2 p-2'> | ||
| <ul> | ||
| {entry.resources.map((resource: Resource, resourceIndex: number) => ( | ||
| <li className='p-2' key={resourceIndex}> | ||
| <a className='text-cyan-500 underline' href={resource.link}> | ||
| {resource.title} | ||
| </a> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| </td> | ||
| </tr> | ||
| ))} | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
| </center> | ||
| ))} | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
|
|
||
| {/* Mobile Card View */} | ||
| <div className='md:hidden my-8 space-y-4'> | ||
| {AdoptersList.map((entry: Adopter, index: number) => ( | ||
| <div | ||
| key={index} | ||
| className='border border-gray-300 rounded-lg p-4 bg-white shadow-sm' | ||
| data-testid='Adopters' | ||
| > | ||
| <div className='mb-3'> | ||
| <h3 className='font-bold text-lg text-gray-900'>{entry.companyName}</h3> | ||
| </div> | ||
| <div className='mb-3'> | ||
| <h4 className='font-semibold text-sm text-gray-700 mb-1'>Use Case:</h4> | ||
| <p className='text-gray-600 text-sm'>{entry.useCase}</p> | ||
| </div> | ||
| <div> | ||
| <h4 className='font-semibold text-sm text-gray-700 mb-2'>Resources:</h4> | ||
| <ul className='space-y-1'> | ||
| {entry.resources.map((resource: Resource, resourceIndex: number) => ( | ||
| <li key={resourceIndex}> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what are the things we are mapping in resources
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| <a className='text-cyan-500 underline hover:text-cyan-600 text-sm' href={resource.link}> | ||
| {resource.title} | ||
| </a> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| </div> | ||
| ))} | ||
| </div> | ||
| </div> | ||
| </GenericLayout> | ||
| ); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does number signify here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index: number explicitly documents that the map callback’s second argument is a 0-based numeric index, improving readability and type safety (even though TypeScript could infer it).