Spaces:
Build error
Build error
Update <main> container to be reuseable
Browse files
frontend/app/about/page.tsx
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
"use client";
|
2 |
|
3 |
import Header from "@/app/components/header";
|
|
|
4 |
|
5 |
export default function About() {
|
6 |
|
7 |
return (
|
8 |
-
<
|
9 |
<Header />
|
10 |
<div className="rounded-xl shadow-xl p-4 mb-8 z-10 max-w-5xl w-full">
|
11 |
<div className="max-w-2xl mx-auto p-4">
|
@@ -26,6 +27,6 @@ export default function About() {
|
|
26 |
</div>
|
27 |
</div>
|
28 |
</div>
|
29 |
-
</
|
30 |
);
|
31 |
}
|
|
|
1 |
"use client";
|
2 |
|
3 |
import Header from "@/app/components/header";
|
4 |
+
import Main from "@/app/components/ui/main-container";
|
5 |
|
6 |
export default function About() {
|
7 |
|
8 |
return (
|
9 |
+
<Main>
|
10 |
<Header />
|
11 |
<div className="rounded-xl shadow-xl p-4 mb-8 z-10 max-w-5xl w-full">
|
12 |
<div className="max-w-2xl mx-auto p-4">
|
|
|
27 |
</div>
|
28 |
</div>
|
29 |
</div>
|
30 |
+
</Main>
|
31 |
);
|
32 |
}
|
frontend/app/chat/page.tsx
CHANGED
@@ -1,14 +1,15 @@
|
|
1 |
"use client";
|
2 |
|
3 |
import Header from "@/app/components/header";
|
|
|
4 |
import ChatSection from "@/app/components/chat-section";
|
5 |
|
6 |
export default function Chat() {
|
7 |
|
8 |
return (
|
9 |
-
<
|
10 |
<Header />
|
11 |
<ChatSection />
|
12 |
-
</
|
13 |
);
|
14 |
}
|
|
|
1 |
"use client";
|
2 |
|
3 |
import Header from "@/app/components/header";
|
4 |
+
import Main from "@/app/components/ui/main-container";
|
5 |
import ChatSection from "@/app/components/chat-section";
|
6 |
|
7 |
export default function Chat() {
|
8 |
|
9 |
return (
|
10 |
+
<Main>
|
11 |
<Header />
|
12 |
<ChatSection />
|
13 |
+
</Main>
|
14 |
);
|
15 |
}
|
frontend/app/components/ui/main-container.tsx
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// main-container.tsx
|
2 |
+
|
3 |
+
import React, { ReactNode } from "react";
|
4 |
+
import { cn } from "@/app/components/ui/lib/utils";
|
5 |
+
|
6 |
+
interface ContainerProps {
|
7 |
+
children: ReactNode;
|
8 |
+
}
|
9 |
+
|
10 |
+
const Main: React.FC<ContainerProps> = ({ children }) => {
|
11 |
+
return (
|
12 |
+
<main className={cn("flex min-h-screen flex-col items-center gap-10 background-gradient dark:background-gradient-dark pt-10 px-4")}>
|
13 |
+
{children}
|
14 |
+
</main>
|
15 |
+
);
|
16 |
+
};
|
17 |
+
|
18 |
+
export default Main;
|
frontend/app/page.tsx
CHANGED
@@ -6,12 +6,13 @@ import Link from 'next/link';
|
|
6 |
import * as React from 'react'
|
7 |
import { IconSpinner } from '@/app/components/ui/icons'
|
8 |
import logo from '../public/smart-retrieval-logo.webp'
|
|
|
9 |
|
10 |
export default function Home() {
|
11 |
const [isLoading, setIsLoading] = React.useState(false);
|
12 |
|
13 |
return (
|
14 |
-
<
|
15 |
<Header />
|
16 |
<div className="rounded-xl shadow-xl p-4 mb-8 z-10 max-w-5xl w-full">
|
17 |
<div className="max-w-2xl mx-auto p-4 text-center">
|
@@ -47,6 +48,6 @@ export default function Home() {
|
|
47 |
</div>
|
48 |
</div>
|
49 |
</div>
|
50 |
-
</
|
51 |
);
|
52 |
}
|
|
|
6 |
import * as React from 'react'
|
7 |
import { IconSpinner } from '@/app/components/ui/icons'
|
8 |
import logo from '../public/smart-retrieval-logo.webp'
|
9 |
+
import Main from "@/app/components/ui/main-container";
|
10 |
|
11 |
export default function Home() {
|
12 |
const [isLoading, setIsLoading] = React.useState(false);
|
13 |
|
14 |
return (
|
15 |
+
<Main>
|
16 |
<Header />
|
17 |
<div className="rounded-xl shadow-xl p-4 mb-8 z-10 max-w-5xl w-full">
|
18 |
<div className="max-w-2xl mx-auto p-4 text-center">
|
|
|
48 |
</div>
|
49 |
</div>
|
50 |
</div>
|
51 |
+
</Main>
|
52 |
);
|
53 |
}
|
frontend/app/search/page.tsx
CHANGED
@@ -1,14 +1,15 @@
|
|
1 |
"use client";
|
2 |
|
3 |
import Header from "@/app/components/header";
|
|
|
4 |
import SearchSection from "@/app/components/search-section";
|
5 |
|
6 |
export default function Search() {
|
7 |
|
8 |
return (
|
9 |
-
<
|
10 |
<Header />
|
11 |
<SearchSection />
|
12 |
-
</
|
13 |
);
|
14 |
}
|
|
|
1 |
"use client";
|
2 |
|
3 |
import Header from "@/app/components/header";
|
4 |
+
import Main from "@/app/components/ui/main-container";
|
5 |
import SearchSection from "@/app/components/search-section";
|
6 |
|
7 |
export default function Search() {
|
8 |
|
9 |
return (
|
10 |
+
<Main>
|
11 |
<Header />
|
12 |
<SearchSection />
|
13 |
+
</Main>
|
14 |
);
|
15 |
}
|
frontend/app/sign-in/page.tsx
CHANGED
@@ -2,10 +2,11 @@
|
|
2 |
|
3 |
import { GoogleLoginButton, SGIDLoginButton } from '@/app/components/login-buttons';
|
4 |
import Header from "@/app/components/header";
|
|
|
5 |
|
6 |
const SignInPage = () => {
|
7 |
return (
|
8 |
-
<
|
9 |
<Header />
|
10 |
<div className="rounded-xl shadow-xl p-4 mb-8 z-10 max-w-5xl w-full">
|
11 |
<div className="max-w-2xl mx-auto text-center">
|
@@ -38,7 +39,7 @@ const SignInPage = () => {
|
|
38 |
</div>
|
39 |
</div>
|
40 |
</div>
|
41 |
-
</
|
42 |
);
|
43 |
};
|
44 |
|
|
|
2 |
|
3 |
import { GoogleLoginButton, SGIDLoginButton } from '@/app/components/login-buttons';
|
4 |
import Header from "@/app/components/header";
|
5 |
+
import Main from "@/app/components/ui/main-container";
|
6 |
|
7 |
const SignInPage = () => {
|
8 |
return (
|
9 |
+
<Main>
|
10 |
<Header />
|
11 |
<div className="rounded-xl shadow-xl p-4 mb-8 z-10 max-w-5xl w-full">
|
12 |
<div className="max-w-2xl mx-auto text-center">
|
|
|
39 |
</div>
|
40 |
</div>
|
41 |
</div>
|
42 |
+
</Main>
|
43 |
);
|
44 |
};
|
45 |
|