Skip to content
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

FIXED: Warranty Card UI Improve Responsiveness and Text Overflow Handling #9491

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/Assets/AssetWarrantyCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function AssetWarrantyCard(props: { asset: AssetData }) {
}, [isCopied]);

return (
<div className="warranty-card relative z-10 flex h-full w-screen flex-col overflow-hidden p-6 text-white transition-all hover:scale-[1.01] hover:from-primary-600 hover:to-primary-700 md:w-full md:rounded-xl xl:w-96">
<div className="warranty-card relative z-10 flex h-full w-full flex-col overflow-hidden p-6 text-white transition-all hover:scale-[1.01] hover:from-primary-600 hover:to-primary-700 rounded-xl xl:w-96">
<div className="mb-3 text-right text-lg font-bold italic">
{asset.manufacturer}
</div>
Expand Down Expand Up @@ -78,7 +78,7 @@ export default function AssetWarrantyCard(props: { asset: AssetData }) {
["Phone", asset.support_phone, "l-phone"],
["Email", asset.support_email, "l-envelope"],
].map((item) => (
<div className="flex items-center">
<div className="flex flex-wrap items-center">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add missing key prop for list items.

React requires a unique key prop for elements in an iterable to maintain component state and optimize rendering.

-<div className="flex flex-wrap items-center">
+<div key={`support-${item[0]}`} className="flex flex-wrap items-center">

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 Biome (1.9.4)

[error] 81-81: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

{item[1] && (
<>
<div className="w-16 italic text-secondary-200">
Expand Down
Loading