Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/[sdSlug]/my/[pageSlug]/components/TabsClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const TabsClient = (props: Props) => {
useEffect(() => { loadData() }, [context.userChurch])


const getItem = (tab:any) => (<li><Link href={tab.url} data-testid={`my-tab-${tab.label.toLowerCase()}`} aria-label={`Go to ${tab.label}`}>{tab.label}</Link></li>)
const getItem = (tab:any) => (<li key={tab.url}><Link href={tab.url} data-testid={`my-tab-${tab.label.toLowerCase()}`} aria-label={`Go to ${tab.label}`}>{tab.label}</Link></li>)

return <ul data-testid="my-portal-tabs" aria-label="Member portal navigation">
{getTabs().map((tab, index) => getItem(tab))}
Expand Down
3 changes: 2 additions & 1 deletion src/components/checkin/Groups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ export function Groups({ selectedHandler }: Props) {
let gt: GroupCategoryInterface[] = [];

const sortedGroups = CheckinHelper.selectedServiceTime?.groups?.sort((a, b) =>
(a.categoryName || "") > (b.categoryName || "") ? 1 : -1
((a?.categoryName || "") > (b?.categoryName || "")) ? 1 : -1
);

sortedGroups?.forEach((g) => {
if (!g) return;
if (g.categoryName !== category) gt.push({ key: gt.length, name: g.categoryName || "", items: [] });
gt[gt.length - 1].items.push(g);
category = g.categoryName || "";
Expand Down
3 changes: 2 additions & 1 deletion src/components/checkin/Household.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export function Household({ completeHandler = () => { } }: Props) {
let hasSelection = false;
if (stSessions.length > 0) {
const groupId = stSessions[0].session?.groupId || "";
const group: GroupInterface = ArrayHelper.getOne(st.groups || [], "id", groupId);
const validGroups = (st.groups || []).filter((g) => g != null);
const group: GroupInterface = ArrayHelper.getOne(validGroups, "id", groupId);
selectedGroupName = group?.name || "None";
hasSelection = true;
}
Expand Down