Add language translation system and weather widget with admin controls
This commit is contained in:
@@ -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' },
|
||||
|
||||
Reference in New Issue
Block a user