Skip to content

GPT-32: Amplify dashboard#17

Merged
devkobetran merged 5 commits intomainfrom
GPT-32-Amplify-Create-a-view-dashboard-of-items-Backend-Integration-Part-2-Jeffrey-Cheung
Sep 5, 2025
Merged

GPT-32: Amplify dashboard#17
devkobetran merged 5 commits intomainfrom
GPT-32-Amplify-Create-a-view-dashboard-of-items-Backend-Integration-Part-2-Jeffrey-Cheung

Conversation

@jecheung9
Copy link
Collaborator

No description provided.

{dashboardItems.length === 0 ? (
<p>No items found.</p>
) : (
dashboardItems.map((item) => (
Copy link
Owner

Choose a reason for hiding this comment

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

You might need to double check the ItemCard component.
So dashboardItems might have more data fields than expected compared to what ItemCard is taking in.

But we might not want to pass all of the fields in, we just want to render some of it per what is described in the user story. You could extract the necessary fields needed from dashboardItems, and pass each desired field as a prop into ItemCard.

const [dashboardItems, setDashboardItems] = useState<ItemInputs[]>([]);
const [loading, setLoading] = useState(true);

console.log(client.models);
Copy link
Owner

Choose a reason for hiding this comment

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

remove the console log now that it is working

<h2>{itemName}</h2>
<div className="item-barcode">{barcode}</div>
<p>{description}</p>
<div className="item-category-and-store">{category} | {storeName}</div>
Copy link
Owner

Choose a reason for hiding this comment

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

Looking at the code now.

Maybe easier to make storeName it's own line

@devkobetran devkobetran merged commit 1755400 into main Sep 5, 2025
1 of 2 checks passed
@devkobetran devkobetran deleted the GPT-32-Amplify-Create-a-view-dashboard-of-items-Backend-Integration-Part-2-Jeffrey-Cheung branch September 5, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants