fix: auto-refresh subscription after creation + back button already exists

This commit is contained in:
Umbrix Dev
2026-02-09 04:56:14 +03:00
parent b284d01e14
commit 0d2d862d44
2 changed files with 11 additions and 2 deletions

View File

@@ -74,6 +74,15 @@ export default function Home() {
return;
}
// Проверяем параметр refresh в URL
const urlParams = new URLSearchParams(window.location.search);
const shouldRefresh = urlParams.get('refresh') === 'true';
if (shouldRefresh) {
console.log('🔄 Refresh requested - clearing URL param');
// Убираем параметр из URL без перезагрузки страницы
window.history.replaceState({}, '', window.location.pathname);
}
try {
// Запрашиваем подписку по Telegram ID через API
const params = new URLSearchParams();