Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const metadata: Metadata = {
template: "%s | FastVote",
},
description: "빠른 익명 투표 - 간편하게 투표를 만들고 공유하세요",
metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || "https://fastvote.geekgoing.com"),
metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || "https://fastvote.geekgoing.org"),
openGraph: {
title: "FastVote",
description: "빠른 익명 투표 - 간편하게 투표를 만들고 공유하세요",
Expand Down
6 changes: 3 additions & 3 deletions frontend/app/vote/[uuid]/vote-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
const [selectedOptions, setSelectedOptions] = useState<string[]>([]);
const [voteError, setVoteError] = useState('');

const [copySuccess, setCopySuccess] = useState(false);

Check warning on line 41 in frontend/app/vote/[uuid]/vote-client.tsx

View workflow job for this annotation

GitHub Actions / test

'copySuccess' is assigned a value but never used
const [shouldConnectWs, setShouldConnectWs] = useState(false);

const [comments, setComments] = useState<Comment[]>([]);
Expand Down Expand Up @@ -91,7 +91,7 @@
if (shareToken) {
try {
await api.verifyPassword(uuid, undefined, shareToken);
} catch (err) {

Check warning on line 94 in frontend/app/vote/[uuid]/vote-client.tsx

View workflow job for this annotation

GitHub Actions / test

'err' is defined but never used
setState('password');
return;
}
Expand Down Expand Up @@ -138,7 +138,7 @@
};

loadRoom();
}, [uuid]);

Check warning on line 141 in frontend/app/vote/[uuid]/vote-client.tsx

View workflow job for this annotation

GitHub Actions / test

React Hook useEffect has missing dependencies: 't.errors.loadFailed' and 't.errors.notFound'. Either include them or remove the dependency array

// WebSocket connection for real-time updates
useEffect(() => {
Expand Down Expand Up @@ -288,7 +288,7 @@
content: commentContent.trim(),
nickname: commentNickname.trim() || undefined,
});
setComments([...comments, newComment]);
setComments([newComment, ...comments]);
setCommentContent('');
setCommentNickname('');
} catch (err) {
Expand Down Expand Up @@ -779,15 +779,15 @@
</div>
</form>

{/* Comments List */}
{/* Comments List (newest first) */}
<div key={locale} className="space-y-3">
{comments.length === 0 ? (
<div className="text-center py-8 text-gray-400 dark:text-gray-500">
<MessageCircle size={32} className="mx-auto mb-2 opacity-30" />
<p className="text-sm">{t.noCommentsYet}</p>
</div>
) : (
comments.map((comment) => (
[...comments].sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()).map((comment) => (
<div
key={comment.id}
className="p-4 rounded-xl bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-sm"
Expand Down
Loading