Skip to content

Commit d4ed5b7

Browse files
committed
Fix max thread width
1 parent 1486660 commit d4ed5b7

File tree

6 files changed

+799
-444
lines changed

6 files changed

+799
-444
lines changed

postcss.config.mjs

Lines changed: 4 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,5 @@
1-
const safelist = [
2-
/html/,
3-
/body/,
4-
/^tw:/,
5-
/^maxSm:/,
6-
/^maxXl:/,
7-
/^maxLg:/,
8-
/^smToMd:/,
9-
/^sm:/,
10-
/^md:/,
11-
/^lg:/,
12-
/^xl:/,
13-
/^2xl:/,
14-
/^3xl:/,
15-
/^child:/,
16-
/^hover:/,
17-
/^focus:/,
18-
/^group/,
19-
/^tw:group-hover/,
20-
/^last:/,
21-
/^first:/,
22-
/^even:/,
23-
/^before:/,
24-
/^after:/,
25-
/^nextIcon^/,
26-
/^modal-/,
27-
/^swiper/,
28-
/^react-tabs/,
29-
];
30-
31-
export default {
32-
plugins: {
33-
"@tailwindcss/postcss": {},
34-
...(process.env.NODE_ENV === "production"
35-
? {
36-
"@fullhuman/postcss-purgecss": {
37-
content: ["./src/**/*.tsx"],
38-
defaultExtractor: (content) => content.match(/[\w-/:]+(?<!:)/g) || [],
39-
safelist: {
40-
standard: safelist,
41-
deep: safelist,
42-
greedy: safelist,
43-
},
44-
},
45-
}
46-
: {}),
47-
},
1+
const config = {
2+
plugins: ["@tailwindcss/postcss"],
483
};
4+
5+
export default config;
File renamed without changes.

src/app/(vetsai)/layout.tsx

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
11
import "@assets/css/vetsai.css";
2+
import type { Metadata } from "next";
3+
import { Geist, Geist_Mono } from "next/font/google";
24

3-
export const metadata = {
4-
title: "Next.js",
5-
description: "Generated by Next.js",
5+
const geistSans = Geist({
6+
variable: "--font-geist-sans",
7+
subsets: ["latin"],
8+
});
9+
10+
const geistMono = Geist_Mono({
11+
variable: "--font-geist-mono",
12+
subsets: ["latin"],
13+
});
14+
15+
export const metadata: Metadata = {
16+
title: "VetsAI",
17+
description: "An AI assistant for Veterans",
618
};
719

8-
const RootLayout = ({ children }: { children: React.ReactNode }) => {
20+
const RootLayout = ({
21+
children,
22+
}: Readonly<{
23+
children: React.ReactNode;
24+
}>) => {
925
return (
1026
<html lang="en">
11-
<body>{children}</body>
27+
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
28+
{children}
29+
</body>
1230
</html>
1331
);
1432
};

src/assets/css/vetsai.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
--radius-md: calc(var(--radius) - 2px);
4343
--radius-lg: var(--radius);
4444
--radius-xl: calc(var(--radius) + 4px);
45+
--thread-max-width: 42rem;
4546
}
4647

4748
:root {

src/components/vetsai/assistant-ui/thread.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,7 @@ const AssistantMessage: FC = () => {
250250

251251
export const Thread: FC = () => {
252252
return (
253-
<ThreadPrimitive.Root
254-
className="bg-background box-border flex h-full flex-col overflow-hidden"
255-
style={{
256-
["--thread-max-width" as string]: "42rem",
257-
}}
258-
>
253+
<ThreadPrimitive.Root className="bg-background box-border flex h-full flex-col overflow-hidden">
259254
<ThreadPrimitive.Viewport className="flex h-full flex-col items-center overflow-y-scroll scroll-smooth bg-inherit px-4 pt-8">
260255
<ThreadWelcome />
261256

0 commit comments

Comments
 (0)