update vars
1c5edb18
2 file(s) · +2 −5
| 17 | 17 | username: string; |
|
| 18 | 18 | }; |
|
| 19 | 19 | ||
| 20 | - | const API_URL = "https://guestbook-db-production.up.railway.app"; |
|
| 21 | - | // const API_URL = "http://localhost:3000"; |
|
| 22 | - | ||
| 23 | - | export default function GuestbookFeed() { |
|
| 20 | + | export default function GuestbookFeed({ API_URL }: { API_URL: string }) { |
|
| 24 | 21 | const [messages, setMessages] = useState<Message[]>([]); |
|
| 25 | 22 | const [isLoading, setIsLoading] = useState(true); |
|
| 26 | 23 | const [isSending, setIsSending] = useState(false); |
| 13 | 13 | <h1 class="font-bold text-2xl">Guestbook</h1> |
|
| 14 | 14 | <p>Welcome to my little digital guestbook! I built this using PGlite, Railway, Clerk, and <a href="https://pinata.cloud" class="style-link" target="_blank" rel="noreferrer">Pinata</a>. Login with your Github account to leave a message!</p> |
|
| 15 | 15 | </div> |
|
| 16 | - | <GuestbookFeed client:load /> |
|
| 16 | + | <GuestbookFeed API_URL={import.meta.env.PUBLIC_API_URL} client:load /> |
|
| 17 | 17 | </div> |
|
| 18 | 18 | </PageLayout> |