Add language translation system and weather widget with admin controls

This commit is contained in:
2026-06-28 15:35:02 -05:00
parent 295c024ced
commit 01ea9e391d
7 changed files with 655 additions and 3 deletions
+3 -1
View File
@@ -99,7 +99,9 @@ export default function RoomsPage() {
const postComment = async (roomId: number) => {
if (!draft.trim() || sending) return;
setSending(true);
const photo = getPhoto(roomId, activePhotoByRoom[roomId] || 0);
const room = rooms.find(r => r.id === roomId);
if (!room) return;
const photo = getPhoto(room, activePhotoByRoom[roomId] || 0);
await fetch(`/api/rooms/${roomId}/comments`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },