⚡ Upgrade design & moved backend here & login and settings work with api

This commit is contained in:
alexis committed 2024-09-29 18:04:41 +02:00
1 parent 42d3212624
commit f2d1eb4289
43 files changed
+1881 -359

No files matched your search

+8 -11
View File
@@ -7,21 +7,18 @@ export const useData = () => {
(async () => {
const token = localStorage.getItem('token');
const request = await fetch(
'https://lovemap-backend.vercel.app/user',
{
method: 'GET',
headers: {
Authorization: token,
},
}
);
const request = await fetch('/api/user', {
method: 'GET',
headers: {
Authorization: token,
},
});
const response = await request.json();
const formattedResponse = {
...response.user,
createdat: new Date(response.user.createdat).toLocaleDateString(
...response,
createdat: new Date(response.createdat).toLocaleDateString(
'fr-FR'
),
};