24 lines
517 B
Text
24 lines
517 B
Text
export * as layout from "../layout.tsx";
|
|
|
|
export interface Input {
|
|
admin?: boolean;
|
|
}
|
|
export const meta: Metadata = {
|
|
title: "paper clover q+a",
|
|
description: "ask clover a question",
|
|
};
|
|
|
|
<const/{ admin = false } = input />
|
|
<const/questions = [...Question.getAll()] />
|
|
|
|
<if=!admin>
|
|
<question-form />
|
|
</>
|
|
<for|question| of=questions>
|
|
<question ...{ question, admin } />
|
|
</>
|
|
<footer>
|
|
fun fact: clover has answered ${questions.length} questions
|
|
</footer>
|
|
|
|
import { Question } from "@/q+a/models/Question.ts";
|