);
diff --git a/client/app/settings/sessions/page.tsx b/client/app/settings/sessions/page.tsx
index 60559f9..45a6396 100644
--- a/client/app/settings/sessions/page.tsx
+++ b/client/app/settings/sessions/page.tsx
@@ -1,40 +1,17 @@
'use client';
-import UserSessionCard from '@/components/settings/sessions/user-session-card';
-import { Button } from '@/components/ui/button';
-import useUserSessions from '@/lib/hooks/useUserSessions';
-import React from 'react';
+import UserSessionList from '@/components/settings/sessions/user-session-list';
export default function SessionsSettingsPage() {
- const userSessions = useUserSessions();
-
return (
-
-
+
+
Sessions
Here are all the sessions that are currently active. Revoke any
sessions that you do not recognize.
-
- {userSessions.data.pages.map((page, i) => (
-
- {page.entities.map((userSession) => (
-
- ))}
-
- ))}
- {userSessions.hasNextPage ? (
-
- ) : null}
-
+
);
}
diff --git a/client/components/settings/passkeys/passkeys-list.tsx b/client/components/settings/passkeys/passkeys-list.tsx
new file mode 100644
index 0000000..fdc6214
--- /dev/null
+++ b/client/components/settings/passkeys/passkeys-list.tsx
@@ -0,0 +1,30 @@
+'use client';
+import { Button } from '@/components/ui/button';
+import useUserSessions from '@/lib/hooks/useUserSessions';
+import React from 'react';
+
+export default function PasskeysList() {
+ const userSessions = useUserSessions();
+
+ return (
+
+ {userSessions.data.pages.map((page, i) => (
+
+ {page.entities.map((userSession) => (
+
+ ))}
+
+ ))}
+ {userSessions.hasNextPage ? (
+
+ ) : null}
+
+ );
+}
diff --git a/client/components/settings/sessions/user-session-card.tsx b/client/components/settings/sessions/user-session-card.tsx
index a794560..cf62e57 100644
--- a/client/components/settings/sessions/user-session-card.tsx
+++ b/client/components/settings/sessions/user-session-card.tsx
@@ -1,3 +1,4 @@
+'use client';
import { Button } from '@/components/ui/button';
import {
Card,
@@ -8,7 +9,7 @@ import {
import { UserSessionSchema } from '@/generated/openapi/v1.0';
import useDeleteUserSession from '@/lib/hooks/useDeleteUserSession';
-const createdAtFormat = new Intl.DateTimeFormat('en', {
+const dateTimeFormat = new Intl.DateTimeFormat('en', {
day: '2-digit',
month: 'long',
year: 'numeric',
@@ -25,6 +26,9 @@ export default function UserSessionCard({
await deleteUserSession.mutateAsync({ sessionId: userSession.id });
}
+ console.log(userSession.loggedOutAt);
+ console.log(userSession.createdAt);
+
return (
@@ -48,9 +52,15 @@ export default function UserSessionCard({
-
- created on {createdAtFormat.format(userSession.createdAt)}
-
+ {userSession.loggedOutAt !== null ? (
+
+ logged out on {dateTimeFormat.format(userSession.createdAt)}
+
+ ) : (
+
+ created on {dateTimeFormat.format(userSession.createdAt)}
+
+ )}
);
diff --git a/client/components/settings/sessions/user-session-list.tsx b/client/components/settings/sessions/user-session-list.tsx
new file mode 100644
index 0000000..8a91325
--- /dev/null
+++ b/client/components/settings/sessions/user-session-list.tsx
@@ -0,0 +1,31 @@
+'use client';
+import { Button } from '@/components/ui/button';
+import useUserSessions from '@/lib/hooks/useUserSessions';
+import React from 'react';
+import UserSessionCard from './user-session-card';
+
+export default function UserSessionList() {
+ const userSessions = useUserSessions();
+
+ return (
+
+ {userSessions.data.pages.map((page, i) => (
+
+ {page.entities.map((userSession) => (
+
+ ))}
+
+ ))}
+ {userSessions.hasNextPage ? (
+
+ ) : null}
+
+ );
+}
diff --git a/client/styles/globals.css b/client/styles/globals.css
index da5d241..1411be0 100644
--- a/client/styles/globals.css
+++ b/client/styles/globals.css
@@ -59,6 +59,10 @@
@apply font-sans antialiased;
}
+ html {
+ position: fixed;
+ }
+
html,
body,
body > main,
@@ -66,21 +70,6 @@
@apply h-full w-full;
@apply whitespace-normal;
@apply box-border;
- }
-
- /* Custom Scrollbar Styles */
- ::-webkit-scrollbar {
- @apply w-4;
- }
-
- ::-webkit-scrollbar-track {
- @apply bg-secondary;
- }
-
- ::-webkit-scrollbar-thumb {
- @apply bg-primary;
- @apply rounded-xl;
- @apply border-x-4 border-solid border-transparent;
- @apply bg-clip-padding;
+ @apply overflow-y-auto;
}
}