api update
This commit is contained in:
@@ -199,9 +199,9 @@ export default function Profile() {
|
||||
const handleTrial = async () => {
|
||||
try {
|
||||
await activateTrial();
|
||||
window.location.reload();
|
||||
const newData = await fetchProfile();
|
||||
setData(newData);
|
||||
} catch (e: any) {
|
||||
// 🔥 ИСПРАВЛЕНО: Вывод реальной ошибки с бэкенда
|
||||
alert(`[ERROR] ${e.message}`);
|
||||
}
|
||||
};
|
||||
@@ -209,7 +209,8 @@ export default function Profile() {
|
||||
const handleBuy = async (planName: string) => {
|
||||
try {
|
||||
await buySubscription(planName);
|
||||
window.location.reload();
|
||||
const newData = await fetchProfile();
|
||||
setData(newData);
|
||||
} catch (e: any) {
|
||||
alert(`[ERROR] ${e.message}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user