Good to Release
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user