src/components/Image.tsx: Modified the Image component to return null instead of undefined when no image is provided, ensuring better handling of missing images. [1][2]
Import Cleanup:
Removed withPrefix import from various pages (src/pages/index.tsx, src/pages/products/channels.tsx, src/pages/products/chat.tsx, src/pages/products/livesync.tsx) as it was not being used. [1][2][3][4]
These changes collectively enhance the maintainability and usability of the codebase, particularly in the rendering of card components and handling of images.
A PR description indicating the purpose of the PR.
Description
Card Component Improvements:
src/components/Homepage/BodySection/Card/FeatureCard.tsx
: Updated theFeatureCard
component to make the entire card clickable by adding anavigate
function and conditional rendering forimage
andlinks
.src/components/ProductPage/BodySection/Card/FeatureCard.tsx
: Similar updates to make the card clickable and conditionally renderimage
andlinks
.src/components/ProductPage/BodySection/Card/QuickstartCard.tsx
: Made theQuickstartCard
component clickable and added conditional rendering forimage
andlinks
.src/components/ProductPage/BodySection/Card/TutorialCard.tsx
: Updated theTutorialCard
component to make it clickable and conditionally renderimage
andlinks
.Image Handling:
src/components/Image.tsx
: Modified theImage
component to returnnull
instead ofundefined
when no image is provided, ensuring better handling of missing images. [1] [2]Import Cleanup:
withPrefix
import from various pages (src/pages/index.tsx
,src/pages/products/channels.tsx
,src/pages/products/chat.tsx
,src/pages/products/livesync.tsx
) as it was not being used. [1] [2] [3] [4]Code Refactoring:
src/components/ProductPage/BodySection/BodySection.tsx
: Simplified imports by aggregating card component imports into a single line.src/components/ProductPage/BodySection/Card/index.ts
: Added exports for various card components to facilitate simpler imports elsewhere.These changes collectively enhance the maintainability and usability of the codebase, particularly in the rendering of card components and handling of images.
A PR description indicating the purpose of the PR.
WEB-3917
Review
Instructions on how to review the PR.
The pages that have cards are https://ably-docs-web-3917-rspysishyym.herokuapp.com/docs/ https://ably-docs-web-3917-rspysishyym.herokuapp.com/docs/products/channels https://ably-docs-web-3917-rspysishyym.herokuapp.com/docs/products/spaces https://ably-docs-web-3917-rspysishyym.herokuapp.com/docs/products/livesync https://ably-docs-web-3917-rspysishyym.herokuapp.com/docs/products/chat https://ably-docs-web-3917-rspysishyym.herokuapp.com/docs/products/asset-tracking