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

Fix incorrect data destructuring/access in qwik example #1295

Open
wants to merge 1 commit into
base: main
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 examples/tutorials/qwik.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export default component$(() => {
<h1 class="text-3xl font-bold mb-4">Welcome to the Dinosaur app</h1>
<p class="mb-4">Click on a dinosaur below to learn more.</p>
<ul class="space-y-2">
{dinosaursSignal.value.map((dinosaur: Dino) => (
{dinosaursSignal.value.dinosaurs.map((dinosaur: Dino) => (
<li key={dinosaur.name}>
<Link
href={`/${dinosaur.name.toLowerCase()}`}
Expand Down Expand Up @@ -250,7 +250,7 @@ import type { Dino } from "~/types";
import data from "~/data/dinosaurs.json" with { type: "json" };

export const useDinosaurDetails = routeLoader$(({ params }): Dino => {
const dinosaurs = data;
const { dinosaurs } = data;
const dinosaur = dinosaurs.find(
(dino: Dino) => dino.name.toLowerCase() === params.name.toLowerCase(),
);
Expand Down
Loading