新增自动刷新

This commit is contained in:
2025-05-12 13:52:38 +08:00
parent 38e715b833
commit ae6919014e
3 changed files with 12 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ import { CreateUserEditor } from "./components/create-user-editor";
export default function Page() {
const { users, isLoading, error, total, page, pageSize, mutate } = useUserList();
const { users, isLoading, error, total, page, pageSize, mutate, refresh } = useUserList();
const [editorUserId, setEditorUserId] = useState("");
const handleUserUpdate = async (newUser: User) => {
@@ -49,7 +49,7 @@ export default function Page() {
return (
<>
<div>
<CreateUserEditor >
<CreateUserEditor onRefresh={() => refresh()}>
<Button ></Button>
</CreateUserEditor>
</div>