修复查看帖子、评论、回复评论、点赞、收藏,添加用户等级
Change-Id: Ida9590d7ccee08dcd787a36c7e5cb39a3e26cd0d
diff --git a/src/components/Auth/Login.jsx b/src/components/Auth/Login.jsx
index d635223..19d161d 100644
--- a/src/components/Auth/Login.jsx
+++ b/src/components/Auth/Login.jsx
@@ -99,7 +99,7 @@
// import '../../pages/AuthPage/AuthPage.css';
// import image from './logo.svg';
-// const API_BASE = process.env.REACT_APP_API_BASE;
+//
// const Login = ({ onRegisterClick }) => {
// const [formData, setFormData] = useState({
@@ -115,7 +115,7 @@
// setError('');
// try {
-// const response = await fetch(`${API_BASE}/user/login`, {
+// const response = await fetch(`/user/login`, {
// method: 'POST',
// headers: {
// 'Content-Type': 'application/json',
diff --git a/src/components/Auth/Register.jsx b/src/components/Auth/Register.jsx
index 16b2313..d98a449 100644
--- a/src/components/Auth/Register.jsx
+++ b/src/components/Auth/Register.jsx
@@ -143,7 +143,7 @@
// setError('');
// try {
-// const response = await fetch(`${API_BASE}/user/register`, {
+// const response = await fetch(`/user/register`, {
// method: 'POST',
// headers: {
// 'Content-Type': 'application/json',
diff --git a/src/components/LevelCard.jsx b/src/components/LevelCard.jsx
new file mode 100644
index 0000000..3b16c38
--- /dev/null
+++ b/src/components/LevelCard.jsx
@@ -0,0 +1,14 @@
+import React from 'react';
+
+const LevelCard = ({ level, current, next }) => {
+ return (
+ <div className="border p-4 rounded shadow mb-4 bg-white">
+ <h2 className="text-xl font-bold mb-2">当前等级:Lv.{level}</h2>
+ <p>当前经验:{current}</p>
+ <p>升级所需经验:{next}</p>
+ <progress value={current} max={next} className="w-full mt-2" />
+ </div>
+ );
+};
+
+export default LevelCard;