change dashboard layout

This commit is contained in:
smanylov
2025-12-11 18:28:35 +07:00
parent cdc2dca7dd
commit 67c6d07e4d
22 changed files with 1185 additions and 549 deletions
+7 -1
View File
@@ -1,6 +1,6 @@
'use server'
import { getSessionData } from '@/app/actions/session';
import { localDevelopmentUrl } from '@/app/actions/definitions';
import { localDevelopmentUrl, testUserData } from '@/app/actions/definitions';
const API_BASE_URL = process.env.NODE_ENV === 'development'
? localDevelopmentUrl
@@ -35,6 +35,12 @@ export async function getUserData() {
const userEmail = await getSessionData('email');
const token = await getSessionData('token');
/* для теста */
if (userEmail === "test" && token === "1111") {
return testUserData;
}
/* для теста */
try {
const response = await fetch(`${API_BASE_URL}/v1/api/user?email=${userEmail}`, {
method: 'GET',