diff --git a/frontend-next/.eslintrc.json b/frontend-next/.eslintrc.json
index 6b2f9c6..471d759 100644
--- a/frontend-next/.eslintrc.json
+++ b/frontend-next/.eslintrc.json
@@ -4,6 +4,6 @@
"no-unused-vars": ["warn", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }],
"jsx-a11y/alt-text": "off",
"@next/next/no-img-element": "off",
- "no-console": "on",
+ "no-console": 1
}
}
diff --git a/frontend-next/src/app/login/page.js b/frontend-next/src/app/login/page.js
index 29885e0..0cb57ae 100644
--- a/frontend-next/src/app/login/page.js
+++ b/frontend-next/src/app/login/page.js
@@ -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";
@@ -46,9 +47,9 @@ function Login() {
-
+
-
+
Chat with friends!
Login
@@ -109,7 +110,7 @@ function Login() {
Log In
- Need an account?
Sign Up
+ Need an account?
Sign Up
diff --git a/frontend-next/src/app/page.js b/frontend-next/src/app/page.js
index dee3a1c..91ac733 100644
--- a/frontend-next/src/app/page.js
+++ b/frontend-next/src/app/page.js
@@ -1,6 +1,6 @@
"use client";
import { useState, useEffect } from "react";
-
+import Link from "next/link"
import { auth, database } from "../../firebase-config";
import { ref, get } from "firebase/database";
import { onAuthStateChanged } from "firebase/auth";
@@ -53,24 +53,24 @@ function Home() {
{!isAuthenticated && (
)}
{isAuthenticated && (
-
-
- Continue to App
-
-
+
+
+ Continue to App
+
+
)}
{!isLoadingLoc && roomCount == 1 && (
diff --git a/frontend-next/src/app/register/page.js b/frontend-next/src/app/register/page.js
index 6aba36d..f475d56 100644
--- a/frontend-next/src/app/register/page.js
+++ b/frontend-next/src/app/register/page.js
@@ -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 {
@@ -61,9 +62,9 @@ function Register() {
-
+
-
+
Chat with friends!
Register
@@ -110,7 +111,7 @@ function Register() {
Register
- Have an account?
Log In
+ Have an account?
Login
diff --git a/frontend-next/src/app/user/[stub]/page.js b/frontend-next/src/app/user/[stub]/page.js
index 17bc135..8134315 100644
--- a/frontend-next/src/app/user/[stub]/page.js
+++ b/frontend-next/src/app/user/[stub]/page.js
@@ -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
)}
{!isOwner && (
- Add Friend{" "}
+ Add Friend
)}
diff --git a/frontend-next/src/components/app/datatypes.js b/frontend-next/src/components/app/datatypes.js
index ab5469d..15f97f5 100644
--- a/frontend-next/src/components/app/datatypes.js
+++ b/frontend-next/src/components/app/datatypes.js
@@ -1,3 +1,5 @@
+import Link from "next/link"
+
// Colors for Messages
const userColors = [
"#ff80ed",
@@ -40,13 +42,11 @@ export function Chat({ chatObj }) {
@@ -73,13 +73,11 @@ export function SystemMessage({ chatObj }) {
@@ -93,25 +91,24 @@ export function SystemMessage({ chatObj }) {
// Member for Active/Room members in sidebar
export function Member({ memberObj }) {
return (
-
+
{memberObj.username}
-
+
);
}
// Chat Room Object for myRooms and Nearby in sidebar
export function ChatRoomSidebar({ roomObj }) {
return (
-
location.href = "/chat?room=" + roomObj.path + "/" + roomObj.name + "-" + roomObj.timestamp}
- className="border-[black] border-1 shadow-lg p-2 m-2 rounded-lg cursor-pointer"
- >
-
-
{roomObj.name}
-
{roomObj.description}
-
+
+
+
+
{roomObj.name}
+
{roomObj.description}
+
+
);
}
diff --git a/frontend-next/src/components/app/header.js b/frontend-next/src/components/app/header.js
index f6605f7..01d58d5 100644
--- a/frontend-next/src/components/app/header.js
+++ b/frontend-next/src/components/app/header.js
@@ -2,6 +2,7 @@ import { auth, database } from "../../../firebase-config";
import { ref, set, remove } from "firebase/database";
import { signOut } from "firebase/auth";
import { Popover } from "@headlessui/react";
+import Link from "next/link"
function logout() {
@@ -26,7 +27,6 @@ function closeChatRoom(roomObj, user) {
payload
);
remove(ref(database, `/rooms/${path}/users/online/${user.uid}`));
- location.href = "/app";
}
// Adds room to myRooms
@@ -83,9 +83,9 @@ export function Header({
return (
{mainTab == "chat" && isMyRoom == false && (
@@ -111,14 +111,15 @@ export function Header({
)}
{mainTab == "chat" && (
-
{
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
-
+
)}
@@ -137,19 +138,19 @@ export function Header({
diff --git a/frontend-next/src/components/app/profile/ProfileRoom.js b/frontend-next/src/components/app/profile/ProfileRoom.js
index 80e6268..799c8cc 100644
--- a/frontend-next/src/components/app/profile/ProfileRoom.js
+++ b/frontend-next/src/components/app/profile/ProfileRoom.js
@@ -1,4 +1,5 @@
import { Geo } from "../map/geo";
+import Link from "next/link"
import { dateOptions } from "../datatypes";
// Display of Rooms on user profile
@@ -18,14 +19,14 @@ export function ProfileRoom({ room }) {
Created on {new Date(room.timestamp).toLocaleString(dateOptions)}
-
Open Room
-
+
);