update the page state after policy changed.

This commit is contained in:
Ben
2025-03-01 15:05:23 +08:00
parent 8f4a20fd46
commit bf57b23776

View File

@ -120,6 +120,9 @@
cookieString = _canTrack ? await CookieConsentService.CreateConsentCookieAsync() : await CookieConsentService.WithdrawConsentCookieAsync();
}
//update the page state
PageState.AllowCookies = _canTrack;
if (!string.IsNullOrEmpty(cookieString))
{
var interop = new Interop(JSRuntime);