Last active
April 4, 2024 18:30
-
-
Save colepeters/1ab7d8f0b6e18d2fa9a42acc496cfdcc to your computer and use it in GitHub Desktop.
Quick example of building a single Breadcrumbs component which takes it data from the store and returns accessible, valid markup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<enhance-breadcrumbs></enhance-breadcrumbs> | |
<!-- rest of the page --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app/api/index.mjs | |
export async function get () { | |
return { | |
json: { | |
breadcrumbs: [ | |
{ url: '/', label: 'Home' }, | |
{ url: '/about', label: 'About' }, | |
{ url: '/about/the-team', label: 'The Team' }, | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment