Skip to content

Commit

Permalink
add result page
Browse files Browse the repository at this point in the history
  • Loading branch information
miso-devel committed Nov 5, 2023
1 parent c382498 commit d40c146
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions client/src/app/result/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
export default function Result({ params }: { params: { id: string } }) {
import Image from "next/image";
export default async function Result({ params }: { params: { id: string } }) {
const { id } = params;
// TODO: ここでid使ってfetchしてくる
const image: { data: { url: string } } = await (await fetch(`${process.env.SERVER_URL}/image/${id}`)).json();

return (
<main className='flex min-h-screen flex-col items-center justify-center gap-5 bg-secondary'>
<h1 className='font-bold text-4xl text-main stroke-black text-stroke'>
DUCK STREAM
</h1>
<div className='w-[95vw] h-[65vh] bg-slate-300 rounded-sm' />
<a className='text-2xl hover:text-main' href='/'>
<main className="flex min-h-screen flex-col items-center justify-center gap-5 bg-secondary">
<h1 className="font-bold text-4xl text-main stroke-black text-stroke">DUCK STREAM</h1>
<div className="p-5">
<Image src={image.data.url} width={300} height={300} alt="result-image" />
</div>
<a className="text-2xl hover:text-main" href="/">
TOPへ
</a>
</main>
Expand Down

0 comments on commit d40c146

Please sign in to comment.