mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
overseer improvements and new social buttones
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
export function getSessionSocials(state) {
|
||||
const socials = state?.session?.socials;
|
||||
return Array.isArray(socials) ? socials : [];
|
||||
}
|
||||
|
||||
export function getSocialById(state, socialId) {
|
||||
const key = String(socialId || '').trim().toLowerCase();
|
||||
if (!key) return null;
|
||||
return (
|
||||
getSessionSocials(state).find((entry) => {
|
||||
const entryKey = String(entry?.id || entry?.label || '').trim().toLowerCase();
|
||||
return entryKey === key;
|
||||
}) || null
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user