diff --git a/frontend/src/components/UserSessionsOverview/AppSessionsList.tsx b/frontend/src/components/UserSessionsOverview/AppSessionsList.tsx index bcf8f426..9684d435 100644 --- a/frontend/src/components/UserSessionsOverview/AppSessionsList.tsx +++ b/frontend/src/components/UserSessionsOverview/AppSessionsList.tsx @@ -110,6 +110,11 @@ const paginationFamily = atomFamily((userId: string) => { return paginationAtom; }); +// A type-safe way to ensure we've handled all session types +const unknownSessionType = (type: never): never => { + throw new Error(`Unknown session type: ${type}`); +}; + const AppSessionsList: React.FC<{ userId: string }> = ({ userId }) => { const [pending, startTransition] = useTransition(); const result = useAtomValue(appSessionListFamily(userId)); @@ -131,7 +136,8 @@ const AppSessionsList: React.FC<{ userId: string }> = ({ userId }) => {