【发布时间】:2021-10-12 01:51:21
【问题描述】:
These are the details of the API in "pending" status.
const checkWelcomeRewardShown = async () => {
try {
if (localStorage.getItem("userType") === "student") {
let res = await axios.get(`${process.env.REACT_APP_BASE_URL}/api/gethasnotseenintro`);
if (res?.data?.status === "success" && res?.data?.notSeen) {
await axios.get(`${process.env.REACT_APP_BASE_URL}/api/getunlocktokenuser`);
await axios.get(`${process.env.REACT_APP_BASE_URL}/api/falsewhenfirstlogin`);
}
let response = await axios.get(`${process.env.REACT_APP_BASE_URL}/api/seenPopupForLinkedinAndFeedback`);
}
} catch (error) {}
};
useEffect(() => {
checkWelcomeRewardShown();
dispatch(showAllPopups());
}, [localStorage.getItem("user_id")]);
【问题讨论】:
标签: node.js reactjs api routes axios