Add create game and manage game pages, update navigation and session handling for individual and business users

This commit is contained in:
bobbert committed 2026-03-17 23:33:30 +00:00
1 parent 1bd640f8d5
commit 6e5fe2b8b8
21 files changed
+831 -137

No files matched your search

+16 -1
View File
@@ -3,6 +3,8 @@ const session = {
currentGid: null,
currentSGid: null,
currentTGid: null,
currentIsBusiness: null,
currentIsAcceptedAdmin: false,
};
const setSessionUser = (user) => {
@@ -10,6 +12,8 @@ const setSessionUser = (user) => {
session.currentGid = user?.Gid ?? null;
session.currentSGid = user?.SGid ?? null;
session.currentTGid = user?.TGid ?? null;
session.currentIsBusiness = user?.isBusiness ?? null;
session.currentIsAcceptedAdmin = Boolean(user?.IsAcceptedAdmin);
};
const setSessionGroup = (gid, sgid = null) => {
@@ -19,12 +23,23 @@ const setSessionGroup = (gid, sgid = null) => {
}
};
const setSessionMembership = ({ gid = null, sgid = null, isAcceptedAdmin = false } = {}) => {
session.currentGid = gid;
session.currentSGid = sgid;
session.currentIsAcceptedAdmin = Boolean(isAcceptedAdmin);
};
const setSessionTeam = (tgid) => {
session.currentTGid = tgid ?? null;
};
const getSession = () => ({ ...session });
export { setSessionUser, setSessionGroup, setSessionTeam, getSession };
export { setSessionUser, setSessionGroup, setSessionMembership, setSessionTeam, getSession };
// Default placeholder export to avoid Expo Router treating this non-component file as a route without a default.
export default function SessionStorePlaceholder() {
return null;
}