Elliott-Chong / chatpdf-yt

https://chatpdf-elliott.vercel.app
641 stars 263 forks source link

Webpage truncated #22

Open babelpainterwell opened 8 months ago

babelpainterwell commented 8 months ago

Anybody has the issue that the chat page is truncated to be only left with the upper part of the screen?

I had this issue while coding along this tutorial and it still exists when I cloned this repo and ran it locally.

WechatIMG172

charlie-ttt commented 8 months ago

Yes have similar issue as well

Ealanisln commented 8 months ago

I'm having same issue, any advice?

Screenshot 2023-10-17 at 2 33 42 PM
babelpainterwell commented 8 months ago

This issue should be caused by some inappropriate use of "flex" I guess. The items in the flex container are having the same height as the highest one, that's how I get the clue. Will look deeper into this after some work on hands.

MatthewChiang92 commented 8 months ago

im also having this issue

MatthewChiang92 commented 8 months ago
image

Solved it, change according to the image uploaded in chatsidebar.tsx

Ealanisln commented 8 months ago
image

Solved it, change according to the image uploaded in chatsidebar.tsx

Awesome, it worked fine to me. Thank you @MatthewChiang92

dealbisac commented 8 months ago

You can use the updated code below: `"use client"; import { DrizzleChat } from "@/lib/db/schema"; import Link from "next/link"; import React from "react"; import { Button } from "./ui/button"; import { MessageCircle, PlusCircle } from "lucide-react"; import { cn } from "@/lib/utils"; import axios from "axios"; import SubscriptionButton from "./SubscriptionButton";

type Props = { chats: DrizzleChat[]; chatId: number; isPro: boolean; };

const ChatSideBar = ({ chats, chatId, isPro }: Props) => { const [loading, setLoading] = React.useState(false);

return (

{chats.map((chat) => (

{chat.pdfName}

))}
</div>

); };

export default ChatSideBar; `