Skip to content

Commit 582a949

Browse files
committed
Update About and imports for App.tsx; Update layout for desktop and mobile for both About content and MessageWindow
1 parent 752b279 commit 582a949

File tree

5 files changed

+64
-63
lines changed

5 files changed

+64
-63
lines changed

frontend/src/About.tsx

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { useNavigate } from "react-router-dom";
2+
3+
export default function About() {
4+
const navigate = useNavigate();
5+
6+
return (
7+
<div className="flex items-center h-dvh pt-16 sm:pt-0">
8+
<div className="relative max-w-2xl m-auto p-8 bg-[#F4F4F2] rounded-lg shadow-md">
9+
<button
10+
className="absolute top-4 left-4 flex text-[#4a90e2] hover:text-[#3a7bc8] font-semibold cursor-pointer"
11+
onClick={() => navigate(-1)}
12+
aria-label="Go back"
13+
>
14+
<svg
15+
className="w-6 h-6 mr-2"
16+
fill="none"
17+
stroke="currentColor"
18+
strokeWidth={2}
19+
viewBox="0 0 24 24"
20+
>
21+
<path
22+
strokeLinecap="round"
23+
strokeLinejoin="round"
24+
d="M15 19l-7-7 7-7"
25+
/>
26+
</svg>
27+
Back
28+
</button>
29+
<p className="my-6">
30+
<strong>Tenant First Aid</strong> is an AI-powered chatbot designed to
31+
help tenants navigate rental issues, answer questions, and provides
32+
legal advice related to housing and eviction.
33+
</p>
34+
<h2 className="text-2xl font-semibold mt-6 mb-2">Features</h2>
35+
<ul className="list-disc list-inside mb-6">
36+
<li>Instant answers to common rental questions</li>
37+
<li>Guidance on tenant rights and landlord obligations</li>
38+
<li>Easy-to-use chat interface</li>
39+
<li>Available 24/7</li>
40+
</ul>
41+
<h2 className="text-2xl font-semibold mt-6 mb-2">How It Works</h2>
42+
<p className="mb-6">
43+
Simply type your question or describe your situation, and Tenant First
44+
Aid will provide helpful information or direct you to relevant
45+
resources.
46+
</p>
47+
<h2 className="text-2xl font-semibold mt-6 mb-2">Disclaimer</h2>
48+
<p className="">
49+
<strong>Tenant First Aid</strong> is an AI assistant and does not
50+
provide legal advice. For complex or urgent legal matters, please
51+
consult a qualified professional.
52+
</p>
53+
</div>
54+
</div>
55+
);
56+
}

frontend/src/AboutPage.tsx

Lines changed: 0 additions & 54 deletions
This file was deleted.

frontend/src/App.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
2-
import Chat from "./Chat.tsx";
3-
import AboutPage from "./AboutPage.tsx";
4-
import SessionContextProvider from "./contexts/SessionContext.tsx";
5-
import Navbar from "./pages/Chat/components/Navbar.tsx";
2+
import Chat from "./Chat";
3+
import About from "./About";
4+
import SessionContextProvider from "./contexts/SessionContext";
5+
import Navbar from "./pages/Chat/components/Navbar";
66

77
export default function App() {
88
return (
@@ -11,7 +11,7 @@ export default function App() {
1111
<Navbar />
1212
<Routes>
1313
<Route path="/" element={<Chat />} />
14-
<Route path="/about" element={<AboutPage />} />
14+
<Route path="/about" element={<About />} />
1515
</Routes>
1616
</Router>
1717
</SessionContextProvider>

frontend/src/Chat.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export default function Chat() {
1616
setSelectedStatute(statute);
1717
setDrawerOpen(true);
1818
}
19-
2019
};
2120

2221
const closeDrawer = () => {
@@ -29,10 +28,10 @@ export default function Chat() {
2928
<div className="flex w-full items-center ">
3029
<div className="flex-1 transition-all duration-300">
3130
<div
32-
className={`container relative flex flex-col mx-auto p-6 bg-[#F4F4F2] rounded-lg shadow-[0_4px_6px_rgba(0,0,0,0.1)]
31+
className={`container relative h-[calc(100vh-4rem)] flex flex-col mx-auto p-6 bg-[#F4F4F2] rounded-lg shadow-[0_4px_6px_rgba(0,0,0,0.1)]
3332
${
3433
isOngoing
35-
? "justify-between h-[calc(100dvh-10rem)]"
34+
? "justify-between sm:h-[calc(100dvh-10rem)]"
3635
: "justify-center max-w-[600px]"
3736
}`}
3837
>

frontend/src/pages/Chat/components/MessageWindow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default function MessageWindow({
5050
</div>
5151
) : (
5252
<div
53-
className={`max-h-[calc(100vh-20rem)] mx-auto max-w-[700px] ${
53+
className={`max-h-[calc(100vh-15rem)] sm:max-h-[calc(100vh-20rem)] mx-auto max-w-[700px] ${
5454
isOngoing ? "overflow-y-scroll" : "overflow-y-none"
5555
}`}
5656
ref={messagesRef}

0 commit comments

Comments
 (0)