fix(frontend): support navigation without subscriber query

This commit is contained in:
yassinedorbozgithub 2025-02-16 08:12:42 +01:00
parent bda750bc52
commit 36994c205c

View File

@ -32,7 +32,7 @@ export const SubscribersList = (props: {
assignedTo: AssignedTo; assignedTo: AssignedTo;
}) => { }) => {
const { query, push } = useRouter(); const { query, push } = useRouter();
const subscriber = query.subscriber?.toString(); const subscriber = query.subscriber?.toString() || null;
const { apiUrl } = useConfig(); const { apiUrl } = useConfig();
const { t, i18n } = useTranslate(); const { t, i18n } = useTranslate();
const chat = useChat(); const chat = useChat();
@ -43,7 +43,7 @@ export const SubscribersList = (props: {
}, 400); }, 400);
useEffect(() => { useEffect(() => {
if (chat && subscriber) { if (chat) {
chat.setSubscriberId(subscriber); chat.setSubscriberId(subscriber);
} }
}, [chat, subscriber]); }, [chat, subscriber]);