Skip to content

Commit 25656b3

Browse files
committed
fix skeletons and some relative imports
1 parent ec39151 commit 25656b3

11 files changed

Lines changed: 35 additions & 18 deletions

File tree

File renamed without changes.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export function ChatPageSkeleton() {
2+
return (
3+
<div className="flex h-full flex-col overflow-hidden">
4+
{/* Header skeleton */}
5+
<div className="flex items-center justify-between border-b px-4 py-3 sm:px-6">
6+
<div className="h-6 w-32 animate-pulse rounded bg-muted" />
7+
<div className="h-8 w-8 animate-pulse rounded bg-muted" />
8+
</div>
9+
{/* Messages area skeleton */}
10+
<div className="flex-1" />
11+
{/* Composer skeleton */}
12+
<div className="shrink-0 border-t bg-background/60 px-4 py-4 sm:px-6">
13+
<div className="h-10 w-full animate-pulse rounded-lg bg-muted" />
14+
</div>
15+
</div>
16+
);
17+
}

apps/web/src/components/guest-skeleton.tsx renamed to apps/web/src/components/skeletons/guest-skeleton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Send } from "lucide-react";
2-
import { Button } from "./ui/button";
3-
import { Input } from "./ui/input";
2+
import { Button } from "@/web/components/ui/button";
3+
import { Input } from "@/web/components/ui/input";
44

55
export function GuestShellSkeleton() {
66
return (
File renamed without changes.

apps/web/src/routes/auth/sign-in.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createFileRoute } from "@tanstack/react-router";
2-
import { SignInShellSkeleton } from "@/web/components/sign-in-skeleton";
2+
import { SignInShellSkeleton } from "@/web/components/skeletons/sign-in-skeleton";
33
import { redirectIfAuthenticated } from "@/web/lib/route-guards";
44
import { SignInForm } from "./-components/sign-in-form";
55

apps/web/src/routes/chat/$chatId.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ChevronDown } from "lucide-react";
66
import { useCallback, useEffect, useRef, useState } from "react";
77
import { toast } from "sonner";
88
import { useStickToBottom } from "use-stick-to-bottom";
9-
import { AppShellSkeleton } from "@/web/components/app-skeleton";
9+
import { ChatPageSkeleton } from "@/web/components/skeletons/chat-skeleton";
1010
import { Button } from "@/web/components/ui/button";
1111
import { Card } from "@/web/components/ui/card";
1212
import {
@@ -15,19 +15,19 @@ import {
1515
} from "@/web/hooks/use-user-settings";
1616
import { MAX_MESSAGE_BATCH } from "@/web/lib/constants";
1717
import { orpc } from "@/web/lib/orpc";
18-
import { ChatComposer } from "@/web/routes/chat/-components/chat-composer";
19-
import { ChatError } from "@/web/routes/chat/-components/chat-error";
20-
import { ChatHeader } from "@/web/routes/chat/-components/chat-header";
21-
import { MessageRenderer } from "@/web/routes/chat/-components/message-renderer";
22-
import { useInitializeChatMessages } from "@/web/routes/chat/-hooks/use-initialize-chat-messages";
23-
import { usePendingConversationMessage } from "@/web/routes/chat/-hooks/use-pending-conversation-message";
24-
import { useStreamingIndicator } from "@/web/routes/chat/-hooks/use-streaming-indicator";
2518
import type { ChatMessage, ConversationSummary } from "@/web/types/chat";
2619
import { broadcastSync } from "@/web/utils/sync";
20+
import { ChatComposer } from "./-components/chat-composer";
21+
import { ChatError } from "./-components/chat-error";
22+
import { ChatHeader } from "./-components/chat-header";
23+
import { MessageRenderer } from "./-components/message-renderer";
24+
import { useInitializeChatMessages } from "./-hooks/use-initialize-chat-messages";
25+
import { usePendingConversationMessage } from "./-hooks/use-pending-conversation-message";
26+
import { useStreamingIndicator } from "./-hooks/use-streaming-indicator";
2727

2828
export const Route = createFileRoute("/chat/$chatId")({
2929
component: ChatPage,
30-
pendingComponent: AppShellSkeleton,
30+
pendingComponent: ChatPageSkeleton,
3131
errorComponent: ChatError,
3232
loader: async ({ params, context }) => {
3333
const { chatId } = params;

apps/web/src/routes/chat/-components/chat-composer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MessageInput } from "@/web/routes/chat/-components/message-input";
1+
import { MessageInput } from "./message-input";
22

33
interface ChatComposerProps {
44
disabled: boolean;

apps/web/src/routes/chat/route.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createFileRoute, redirect } from "@tanstack/react-router";
2-
import { AppShellSkeleton } from "@/web/components/app-skeleton";
2+
import { AppShellSkeleton } from "@/web/components/skeletons/app-skeleton";
33
import { requireAuthenticated } from "@/web/lib/route-guards";
4-
import { ChatShell } from "@/web/routes/chat/-components/chat-shell";
4+
import { ChatShell } from "./-components/chat-shell";
55

66
export const Route = createFileRoute("/chat")({
77
beforeLoad: (opts) => {

apps/web/src/routes/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { createFileRoute, useNavigate } from "@tanstack/react-router";
22
import { Send } from "lucide-react";
33
import type { FormEvent } from "react";
44
import { useCallback, useState } from "react";
5-
import { GuestShellSkeleton } from "@/web/components/guest-skeleton";
5+
import { GuestShellSkeleton } from "@/web/components/skeletons/guest-skeleton";
66
import { Button } from "@/web/components/ui/button";
77
import { Input } from "@/web/components/ui/input";
88
import { redirectIfAuthenticated } from "@/web/lib/route-guards";

apps/web/src/routes/settings/route.lazy.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
useRouterState,
77
} from "@tanstack/react-router";
88
import { useEffect, useMemo, useState } from "react";
9-
import { AppShellSkeleton } from "@/web/components/app-skeleton";
9+
import { AppShellSkeleton } from "@/web/components/skeletons/app-skeleton";
1010
import {
1111
Sheet,
1212
SheetContent,

0 commit comments

Comments
 (0)