Refactors the model card rendering logic by abstracting it into a separate ModelCard component and updates the Home function to utilize this new component.
Implements a new ModelCard component in src/components/ModelCard.tsx that accepts model details as props and renders the model card UI. This includes displaying the model name, description, input price, optional output price, and total price.
Updates the Home function in src/app/page.tsx to import and use the ModelCard component for rendering model cards. This change simplifies the Home function by removing the direct implementation of model card rendering logic and instead passing the necessary model details as props to the ModelCard component.
Related to #13
Refactors the model card rendering logic by abstracting it into a separate
ModelCard
component and updates theHome
function to utilize this new component.ModelCard
component insrc/components/ModelCard.tsx
that accepts model details as props and renders the model card UI. This includes displaying the model name, description, input price, optional output price, and total price.Home
function insrc/app/page.tsx
to import and use theModelCard
component for rendering model cards. This change simplifies theHome
function by removing the direct implementation of model card rendering logic and instead passing the necessary model details as props to theModelCard
component.For more details, open the Copilot Workspace session.