diff --git a/examples/portfolio/src/components/MainHead.astro b/examples/portfolio/src/components/MainHead.astro index 181da7d28d..2dae9ac046 100644 --- a/examples/portfolio/src/components/MainHead.astro +++ b/examples/portfolio/src/components/MainHead.astro @@ -1,9 +1,16 @@ --- -const { title = 'Jeanine White: Personal Site' } = Astro.props; ---- +export interface Props { + title: string; + description?: string[]; +} +export function __state({props}: {props: Props}) { + return {description: props.description || 'This is the default site descrition.'}; +} +--- -{title} +{$props.title} + - + \ No newline at end of file diff --git a/examples/portfolio/src/layouts/project.astro b/examples/portfolio/src/layouts/project.astro index 4ebfed8e11..233bdc6371 100644 --- a/examples/portfolio/src/layouts/project.astro +++ b/examples/portfolio/src/layouts/project.astro @@ -3,12 +3,10 @@ import MainHead from '../components/MainHead.astro'; import Button from '../components/Button/index.jsx'; import Footer from '../components/Footer/index.jsx'; import Nav from '../components/Nav/index.jsx'; - -const { content } = Astro.props; --- - + -