-
Create New Poll
+
创建新投票
{/* Poll Title */}
setTitle(e.target.value)}
- placeholder="Enter poll title"
+ placeholder="输入投票标题"
className="input input-bordered w-full"
/>
@@ -76,12 +76,12 @@ function CreatePollForm() {
{/* Poll Description */}
@@ -91,21 +91,21 @@ function CreatePollForm() {
{/* Poll Options */}
-
+
{options.map((option, index) => (
{options.length > 2 && (
@@ -131,7 +131,7 @@ function CreatePollForm() {
title="Add another option"
onClick={handleAddOption}
>
-
Add Option
+
添加选项
@@ -142,21 +142,21 @@ function CreatePollForm() {
className="btn btn-ghost w-full mt-4 md:w-1/2"
onClick={() => {
const sure = window.confirm(
- "Are you sure you want to clear the poll?"
+ "确定要清除投票内容吗?"
);
if (sure) {
handleClearPoll();
}
}}
>
- Clear Poll
+ 清除投票
{/* Submit Button */}
diff --git a/frontend/src/pages/Dashboard.jsx b/frontend/src/pages/Dashboard.jsx
index 371d7cd..f58d117 100644
--- a/frontend/src/pages/Dashboard.jsx
+++ b/frontend/src/pages/Dashboard.jsx
@@ -60,12 +60,12 @@ function Dashboard() {
{user?.email || "Email"}
-
+
@@ -74,10 +74,10 @@ function Dashboard() {
{/* Dashboard Header */}
- Poll Dashboard
+ 投票仪表板
- Manage your polls, view results, and edit as needed.
+ 管理您的投票,查看结果,并根据需要进行编辑。
@@ -87,7 +87,7 @@ function Dashboard() {
className="btn btn-primary"
onClick={() => navigator("/create")}
>
- Add New Poll
+ 添加新投票
@@ -100,10 +100,10 @@ function Dashboard() {
| # |
- Title |
- Description |
- Published |
- Actions |
+ 标题 |
+ 描述 |
+ 已发布 |
+ 操作 |
diff --git a/frontend/src/pages/Polls.jsx b/frontend/src/pages/Polls.jsx
index fbf9f96..0b0c746 100644
--- a/frontend/src/pages/Polls.jsx
+++ b/frontend/src/pages/Polls.jsx
@@ -19,7 +19,7 @@ function Polls() {
return (
-
Polls
+
投票列表
{isSuccess && (
{data?.data?.polls?.map((poll) => (
@@ -42,14 +42,14 @@ function Polls() {
disabled={page <= 1}
onClick={() => setPage(page - 1)}
>
- Prev
+ 上一页
diff --git a/frontend/src/pages/Register.jsx b/frontend/src/pages/Register.jsx
index 79ea0b8..9f945c3 100644
--- a/frontend/src/pages/Register.jsx
+++ b/frontend/src/pages/Register.jsx
@@ -38,20 +38,20 @@ function Register() {