Connect auth to backend and persist theme preference

This commit is contained in:
lumijiez
2025-06-23 22:21:48 +03:00
parent d4f01c3f73
commit a2d8a1e080
11 changed files with 181 additions and 45 deletions

View File

@@ -0,0 +1,21 @@
'use client';
import { useEffect } from 'react';
import axios from 'axios';
export default function ClientLayoutEffect() {
useEffect(() => {
async function fetchData() {
try {
const res = await axios.get('/token');
console.log('Token response:', res.data);
} catch (error) {
console.error('Token fetch error:', error);
}
}
fetchData().then(r => console.log("Ok"));
}, []);
return null;
}