From 34708538589fae144e498f88235b8bc8331ba6b4 Mon Sep 17 00:00:00 2001 From: Hafid Nur <73023445+hafidnrzs@users.noreply.github.com> Date: Thu, 27 Nov 2025 14:11:35 +0700 Subject: [PATCH] feat(hackathon): update team page - update dark mode color scheme for team page: view, team edit, and submit project page - fix bug in chat where messages are displayed double - make the form field size consistent --- apps/hackathon/src/app/404.tsx | 6 +- .../src/app/teams/[teamId]/chat/page.tsx | 174 +++++++++++--- .../src/app/teams/[teamId]/edit/page.tsx | 117 ++++++--- .../src/app/teams/[teamId]/layout.tsx | 26 +- .../src/app/teams/[teamId]/members/page.tsx | 136 +++++++---- .../hackathon/src/app/teams/[teamId]/page.tsx | 224 ++++++++++-------- .../src/app/teams/[teamId]/submit/page.tsx | 112 ++++++--- apps/hackathon/src/components/sidebar.tsx | 6 + libs/ui/src/atoms/input/input.tsx | 2 +- libs/ui/src/atoms/textarea/textarea.tsx | 2 +- .../src/molecules/input-field/input-field.tsx | 2 +- 11 files changed, 548 insertions(+), 259 deletions(-) diff --git a/apps/hackathon/src/app/404.tsx b/apps/hackathon/src/app/404.tsx index 2db4df6..3a2e703 100644 --- a/apps/hackathon/src/app/404.tsx +++ b/apps/hackathon/src/app/404.tsx @@ -2,13 +2,13 @@ import { Link } from 'react-router-dom'; export default function NotFoundPage() { return ( -
+
The page you are looking for doesn't exist or has been moved.
{ const { teamId } = useParams<{ teamId: string }>(); @@ -13,16 +20,54 @@ const TeamChatPage: FC = (): ReactElement => { const { data: teamData } = useTeamById(teamId || ''); const { data: messages, isLoading } = useTeamMessages(teamId || ''); - const { mutateAsync: sendMessage, isPending: isSending } = useSendMessage(teamId || ''); + const { mutateAsync: sendMessage, isPending: isSending } = useSendMessage( + teamId || '' + ); const { mutateAsync: deleteMessage } = useDeleteMessage(teamId || ''); const team = teamData?.data; const currentUserId = session?.user?.id; + // Message type used for UI rendering + interface ChatMessage { + id: string; + user_id: string; + user?: { + avatar?: string; + fullname?: string; + }; + message: string; + created_at: string; + } + + // Inline delete confirmation UI state + const [deleteTargetId, setDeleteTargetId] = useState{team?.name}
++ {team?.name} +
{msg.message}
++ {msg.message} +
{/* Delete button */} {canDelete && (+
Be the first to start the conversation!
Only the team leader can edit team information
-+ Only the team leader can edit team information +
+Update your team details
++ Update your team details +