From 81e8c353f0e5e5f56b08ee13bad138bfba533dbb Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Fri, 24 Jul 2026 01:13:46 +0530 Subject: [PATCH] refactor(public-chat-snapshots-manager): extract info alert into a constant for improved readability and reuse --- .../public-chat-snapshots-manager.tsx | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx b/surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx index 1a299fbe0..e3f8d3173 100644 --- a/surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx +++ b/surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx @@ -17,6 +17,16 @@ interface PublicChatSnapshotsManagerProps { workspaceId: number; } +const infoAlert = ( + + + + Public chats allow anyone with the URL to view a snapshot of a chat. They do not update when + the original chat changes. + + +); + export function PublicChatSnapshotsManager({ workspaceId: _workspaceId, }: PublicChatSnapshotsManagerProps) { @@ -81,14 +91,7 @@ export function PublicChatSnapshotsManager({ if (isLoading) { return (
- - - -
- -
-
-
+ {infoAlert} {/* Cards grid skeleton */}
@@ -135,13 +138,7 @@ export function PublicChatSnapshotsManager({ return (
- - - - Public chats allow anyone with the URL to view a snapshot of a chat. They do not update - when the original chat changes. - - + {infoAlert}