change dashboard layout
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user