
useEffect(() => {
const fetchData = async () => {
try {
const userToken =JSON.parse( localStorage.getItem("cookieFallback"));
const token=userToken[a_session_${process.env.REACT_APP_PROJECT_ID}
]
console.log(token)
const config = {
headers: {
Authorization: Bearer ${token}
}
};
const response = await axios.post('http://localhost:3001/dashborddata/',null,config);
console.log(response.data);
} catch (error) {
console.log(error.message);
}
};
fetchData();
}, []);
Recommended threads
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: { "name": "upload-whitelist", "type"...
- Looking for Partner
I'm looking for partner for long-term collaborating. Of course, I'll pay for you. If you are interested, Please DM me.
- Subdomain failed verification
So I wanted to do a custom subdomain, because local storage doesn't work for me, but I've tried it a long time ago, it didn't work for me, and now I'm trying ag...
