diff --git a/src/pages/Forum/posts-create/CreatePostPage.jsx b/src/pages/Forum/posts-create/CreatePostPage.jsx
index ea2505c..28f1a20 100644
--- a/src/pages/Forum/posts-create/CreatePostPage.jsx
+++ b/src/pages/Forum/posts-create/CreatePostPage.jsx
@@ -1,11 +1,22 @@
-// src/pages/Forum/posts-create/CreatePostPage.jsx
 import React from 'react';
-import { useUserStore } from '../../store/user';
 import CreatePost from './CreatePost';
+import { useUser } from '../../../context/UserContext'; // 注意路径
+
 
 const CreatePostPage = () => {
-  const { user } = useUserStore(); // 拿到 user
-  return <CreatePost userId={user?.id} />;
+  const store = useUser?.();
+  const user = store?.user;
+
+  // 可以加个判断
+  if (!user) {
+    return <p>请先登录后再发帖。</p>;
+  }
+
+  return (
+    <div className="create-post-page">
+      <CreatePost userId={user.user_id} />
+    </div>
+  );
 };
 
 export default CreatePostPage;
