lovely. got a couple of partial implementations....
This commit is contained in:
parent
89ca4013fd
commit
89f526e9d9
14 changed files with 180 additions and 154 deletions
|
@ -1,8 +1,11 @@
|
|||
import type { Entry } from "../content";
|
||||
import { Component } from "solid-js";
|
||||
import { createSlug } from "../content";
|
||||
import { Component, createMemo } from "solid-js";
|
||||
import css from "./list-item.module.css";
|
||||
|
||||
export const ListItem: Component<{ entry: Entry }> = (props) => {
|
||||
const slug = createMemo(() => createSlug(props.entry));
|
||||
|
||||
return (
|
||||
<div class={css.listItem}>
|
||||
<img src={props.entry.thumbnail} />
|
||||
|
@ -10,7 +13,7 @@ export const ListItem: Component<{ entry: Entry }> = (props) => {
|
|||
<main>
|
||||
<strong>{props.entry.title}</strong>
|
||||
|
||||
<a href={`/watch/${props.entry.id}`}>Watch now</a>
|
||||
<a href={`/watch/${slug()}`}>Watch now</a>
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue