Good to Release

This commit is contained in:
2024-04-03 22:04:19 +00:00
parent 6179f8d4c2
commit 8bca33a039
5 changed files with 10 additions and 8 deletions
+1
View File
@@ -1,5 +1,6 @@
"use client";
import { useForm, Form } from "react-hook-form";
import Link from "next/link"
import { useRouter } from "next/navigation";
import "../globals.css";
+1
View File
@@ -2,6 +2,7 @@
import { useRouter } from "next/navigation";
import { useForm, Form } from "react-hook-form";
import "../globals.css";
import Link from "next/link"
import { useState } from "react";
import {
+2 -2
View File
@@ -120,12 +120,12 @@ function UserProfile({ params }) {
}}
className="w-[120px] p-2 cursor-pointer bg-cyan-500 text-white font-bold rounded-full text-center"
>
Edit Profile{" "}
Edit Profile
</a>
)}
{!isOwner && (
<a className="w-[120px] p-2 cursor-pointer bg-cyan-500 text-white font-bold rounded-full text-center">
Add Friend{" "}
Add Friend
</a>
)}
</div>
@@ -42,7 +42,7 @@ export function Chat({ chatObj }) {
<div className="width-[100%] bg-white rounded-lg mt-1 text-left p-1 grid grid-cols-2 mr-2">
<div>
<span style={{ color: userColors[generateColor(chatObj.user)] }}>
<Link href={chatObj.uid && "/user/" + chatObj.uid}
<Link href={`/user/${chatObj.uid}`}
className="hover:font-bold cursor-pointer"
target="_blank">
{chatObj.user}
@@ -73,7 +73,7 @@ export function SystemMessage({ chatObj }) {
<div className="width-[100%] bg-white rounded-lg mt-1 text-left p-1 grid grid-cols-2 mr-2">
<div className="text-[#d1d1d1]">
<span style={{ color: userColors[generateColor(chatObj.user)] }}>
<Link href={chatObj.uid && "/user/" + chatObj.uid}
<Link href={`/user/${chatObj.uid}`}
className="hover:font-bold cursor-pointer"
target="_blank">
{chatObj.user}
@@ -103,7 +103,7 @@ export function Member({ memberObj }) {
export function ChatRoomSidebar({ roomObj }) {
return (
<div className="border-[black] border-1 shadow-lg p-2 m-2 rounded-lg cursor-pointer">
<Link href={"/chat?room=" + roomObj.path + "/" + roomObj.name + "-" + roomObj.timestamp} prefetch={false}>
<Link href={`/chat?room=${roomObj.path}/${roomObj.name}-${roomObj.timestamp}`}>
<div className="col-span-2">
<div className="font-bold">{roomObj.name}</div>
<div className="italic">{roomObj.description}</div>
+3 -3
View File
@@ -27,7 +27,6 @@ function closeChatRoom(roomObj, user) {
payload
);
remove(ref(database, `/rooms/${path}/users/online/${user.uid}`));
location.href = "/app";
}
// Adds room to myRooms
@@ -112,14 +111,15 @@ export function Header({
</a>
)}
{mainTab == "chat" && (
<a
<Link
onClick={() => {
closeChatRoom(chatRoomObj, user);
}}
href="/app"
className="p-2 cursor-pointer bg-cyan-500 text-white font-bold rounded-full mr-5 flex items-center"
>
Close Chat
</a>
</Link>
)}
<Popover className="relative">