Skip to content

Commit

Permalink
πŸ’„ style: Modifying chat and post design
Browse files Browse the repository at this point in the history
- Modify the layout to fit the announcement screen

Related Issue : #167
  • Loading branch information
Lainari committed Jun 19, 2024
1 parent db75e95 commit 52840d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/app/classes/[cId]/[mId]/components/chatComponents/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ShowMain = () => {
const [chatUsers, setChatUsers] = useState<{[key: string]: User}>({});
const params = useParams();
const getClassId = Number(params.cId);
const getScheduleId = 14;
const getScheduleId = 19;
const messagesEndRef = useRef<HTMLDivElement>(null);

const handleGetMessages = () => {
Expand Down Expand Up @@ -101,10 +101,10 @@ const ShowMain = () => {
}, [getScheduleId]);

return (
<div className="flex justify-center mt-10">
<div className="w-full max-w-md">
<div className="w-full mt-2">
<div className="border-4 rounded-lg border-gray-500 p-2 h-[550px] overflow-auto">
<div className="flex h-full flex-col justify-between">
<div className="w-full h-full overflow-auto">
<div className="w-full h-full mt-2">
<div className="border-4 rounded-lg border-gray-500 p-2 h-full overflow-auto">
<p className="text-center inline-block px-4 py-2 text-sm text-white bg-violet-300 rounded-lg w-full">
μ΅œμƒλ‹¨ μ±„νŒ… λ‚΄μš©μž…λ‹ˆλ‹€
</p>
Expand Down Expand Up @@ -162,6 +162,8 @@ const ShowMain = () => {
<div ref={messagesEndRef} />
</div>
</div>
</div>
<div>
<ChatInput setMsg={setMessage} />
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const ManageSubContainer: React.FC = () => {
{showMain ? 'πŸ’¬' : 'πŸ’¬'}
</button>
{showMain && (
<div className="fixed top-0 right-0 w-96 h-full bg-white shadow-lg z-10">
<div className="fixed bottom-0 right-0 w-96 h-full bg-white shadow-lg z-10">
<ShowMain />
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/app/classes/[cId]/components/main/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const Post = ({
{classPosts.map((post, index) =>
!post.IsAnnounced ? (
<div
className="flex justify-center items-center w-full md:w-1/3"
className="flex items-center w-full"
key={post.ID}
onClick={async (event: React.MouseEvent) => {
event.stopPropagation();
Expand Down

0 comments on commit 52840d1

Please sign in to comment.