add author list to homepage
This commit is contained in:
@@ -4,6 +4,8 @@ import { css } from "@emotion/css";
|
||||
import { useWebsocket } from "./hooks/useWebsocket";
|
||||
import { Pico8Player } from "@athingperday/react-pico-player";
|
||||
|
||||
// type ConsoleRef = Parameters<typeof Pico8Player>["0"]["consoleRef"];
|
||||
|
||||
type Game = {
|
||||
carts: Parameters<typeof Pico8Player>["0"]["carts"];
|
||||
};
|
||||
@@ -12,7 +14,7 @@ export const GamePage = () => {
|
||||
const { author, slug } = useParams();
|
||||
// const [searchParams, setSearchParams] = useSearchParams();
|
||||
// const room = searchParams.get('room');
|
||||
// const picoRef = useRef<Pico8ConsoleImperatives>(null);
|
||||
// const picoRef = useRef<ConsoleRef>(null);
|
||||
// const socket = useWebsocket({
|
||||
// url: `/api/ws/room?room=${room}`,
|
||||
// // url: "wss://echo.websocket.org",
|
||||
@@ -89,7 +91,7 @@ export const GamePage = () => {
|
||||
`}
|
||||
>
|
||||
<Pico8Player
|
||||
// ref={picoRef}
|
||||
// consoleRef={picoRef}
|
||||
carts={game.carts}
|
||||
// onGpioChange={(gpio: number[]) => {
|
||||
// console.log("sending gpio");
|
||||
|
||||
+14
-2
@@ -1,3 +1,15 @@
|
||||
import { Link } from "react-router-dom";
|
||||
import { authors } from "../data/authors";
|
||||
|
||||
export const HomePage = () => {
|
||||
return <div>Welcome to Picobook!</div>
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<h2>Welcome to Picobook!</h2>
|
||||
{authors.map((author) => (
|
||||
<Link key={author.username} to={`/u/${author.username}`}>
|
||||
<h3>{author.username}</h3>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user