Skip to content

Commit

Permalink
fix: does not show certify window
Browse files Browse the repository at this point in the history
  • Loading branch information
zrll12 committed Jan 18, 2024
1 parent b4952a2 commit be0a7a1
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import {IsLoggedIn} from "@/interface/hooks";
import {RedirectType} from "next/dist/client/components/redirect";
import Cert from "./component/cert";
import IOC from "@/providers";
import { useAtom } from "jotai";
import { verify } from "../store";
import {useAtom} from "jotai";
import {verify} from "../store";

const getPriceColor = (price: string) => {
switch (price.toLowerCase()) {
Expand Down Expand Up @@ -98,16 +98,22 @@ export default function Page() {
setPictures(r);
});
}
useEffect(()=>{

useEffect(() => {
IOC.certify.getCertifyState()
.catch(()=>{
setCertify(false)
})
.then((e) => {
if (e.data == "false") {
setCertify(false)
}
})
.catch(() => {
setCertify(false)
})
if (used == 0 && total == 1) {
updateInfo();
}
}, [])


const deletePicture = (pid: string) => {
const records = pictures?.records?.filter((record) => record.id !== Number(pid));
Expand Down Expand Up @@ -216,7 +222,7 @@ export default function Page() {
url={SERVER_URL + "/picture/preview?shareMode=2&id=" + picture.id.toString() + "&token=" + cookie.load("token")}
name={picture.fileName} pid={picture.id.toString()} group={group} onDelete={deletePicture}/>)}
{/* <Picture url="https://t7.baidu.com/it/u=2961459243,2146986594&fm=193&f=GIF" name="雪景.png" pid="" onPress={onOpen} /> */}
{!certify && <Cert />}
{!certify && <Cert/>}
</div>
)
}
}

0 comments on commit be0a7a1

Please sign in to comment.