-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: dynamic prompt pages, fixed UI issues with prompt list (#122)
* feat: dynamic prompt pages, fixed UI issues with prompt list * fix: remove migrate body
- Loading branch information
1 parent
cf90f5b
commit e7928e8
Showing
13 changed files
with
78 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
# !/usr/bin/env bash | ||
|
||
envsubst '$${NEXTJS_CONTAINER_IP} $${ACTIX_CONTAINER_IP}' < /etc/nginx/conf.d/${CONF_FILE} > /etc/nginx/conf.d/default.conf | ||
rm -rf /etc/nginx/conf.d/dev-nginx.conf | ||
rm -rf /etc/nginx/conf.d/prod-nginx.conf | ||
nginx -g "daemon off;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"use client" | ||
import Header from "@/components/Navigation/Header"; | ||
import { Prompt } from "@/components/PromptsPage/PromptControls"; | ||
import axios from "axios"; | ||
import { useEffect, useState } from "react"; | ||
|
||
export default function Prompt({ params }: { params: { slug: string } }) { | ||
const [prompt, setPrompt] = useState<Prompt | null>(null) | ||
|
||
useEffect(() => { | ||
async function query() { | ||
const res = await axios.get(`/api/prompt/${params.slug}`); | ||
setPrompt(res.data as Prompt) | ||
|
||
} | ||
query() | ||
}, [params.slug]) | ||
|
||
|
||
return ( | ||
<main className="font-sans flex flex-col min-h-screen justify-start bg-zinc-800 text-white"> | ||
<Header /> | ||
<div className="text-3xl font-bold px-8 md:px-24 py-8">{prompt?.title}</div> | ||
<div className="px-8 md:px-24 pb-8">{prompt?.text}</div> | ||
<div className="px-8 md:px-24 text-zinc-300">Type Rating: {prompt?.rating.toFixed(2)}</div> | ||
</main> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters