mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-01 13:10:44 -03:00
añadido clearAll cuando se hace logout
This commit is contained in:
@@ -19,9 +19,11 @@
|
|||||||
|
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
window.addEventListener('followCacheUpdated', ((
|
window.addEventListener('followCacheUpdated', ((
|
||||||
event: CustomEvent<{ userId: string; isFollowed: boolean }>
|
event: CustomEvent<{ userId: string; isFollowed: boolean } | { clearAll: true }>
|
||||||
) => {
|
) => {
|
||||||
if (event.detail.userId === post.authorId) {
|
if ('clearAll' in event.detail && event.detail.clearAll === true) {
|
||||||
|
cargarSeguido();
|
||||||
|
} else if ('userId' in event.detail && event.detail.userId === post.authorId) {
|
||||||
seguido = event.detail.isFollowed;
|
seguido = event.detail.isFollowed;
|
||||||
}
|
}
|
||||||
}) as EventListener);
|
}) as EventListener);
|
||||||
|
|||||||
Reference in New Issue
Block a user