feat: update
This commit is contained in:
@@ -8,14 +8,17 @@ import styles from "./index.module.less";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import { CommentOutlined, EyeOutlined, HeartOutlined } from "@ant-design/icons";
|
||||
import { getMyShareList } from "@/api/share";
|
||||
import useStore from "@/utils/store/useStore.tsx";
|
||||
import { observer } from "mobx-react";
|
||||
|
||||
export default () => {
|
||||
export default observer(() => {
|
||||
const navigate = useNavigate();
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [data, setData] = useState<[]>([]);
|
||||
const store = useStore("user");
|
||||
const userId: any = store.getUserId();
|
||||
async function getMyShare() {
|
||||
getMyShareList(32).then((res: any) => {
|
||||
console.log(res);
|
||||
getMyShareList(userId).then((res: any) => {
|
||||
if (res && res.success && res.data) {
|
||||
setData(res.data);
|
||||
setLoading(false);
|
||||
@@ -163,4 +166,4 @@ export default () => {
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
Reference in New Issue
Block a user