From 6179f8d4c2ab203e528e707101a799b0a7c0bd73 Mon Sep 17 00:00:00 2001 From: Nicholas Pease Date: Wed, 3 Apr 2024 21:52:55 +0000 Subject: [PATCH] Initial --- frontend-next/src/app/app/page.js | 1 + frontend-next/src/app/login/page.js | 6 +-- frontend-next/src/app/page.js | 22 +++++----- frontend-next/src/app/register/page.js | 6 +-- frontend-next/src/components/app/datatypes.js | 41 +++++++++---------- frontend-next/src/components/app/header.js | 13 +++--- .../src/components/app/profile/ProfileRoom.js | 5 ++- 7 files changed, 47 insertions(+), 47 deletions(-) diff --git a/frontend-next/src/app/app/page.js b/frontend-next/src/app/app/page.js index 75d60e3..c057526 100644 --- a/frontend-next/src/app/app/page.js +++ b/frontend-next/src/app/app/page.js @@ -5,6 +5,7 @@ import { auth, database } from "../../../firebase-config"; import { ref, onValue } from "firebase/database"; import { useAuthState } from "react-firebase-hooks/auth" import { useGeolocated } from "react-geolocated"; +import Link from "next/link" // Header Import import { Header } from "../../components/app/header"; diff --git a/frontend-next/src/app/login/page.js b/frontend-next/src/app/login/page.js index 29885e0..f6b287d 100644 --- a/frontend-next/src/app/login/page.js +++ b/frontend-next/src/app/login/page.js @@ -46,9 +46,9 @@ function Login() {
- + - + Chat with friends!

Login

@@ -109,7 +109,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 && ( - - - + + + )} {!isLoadingLoc && roomCount == 1 && (
diff --git a/frontend-next/src/app/register/page.js b/frontend-next/src/app/register/page.js index 6aba36d..f3c64ee 100644 --- a/frontend-next/src/app/register/page.js +++ b/frontend-next/src/app/register/page.js @@ -61,9 +61,9 @@ function Register() {
- + - + Chat with friends!

Register

@@ -110,7 +110,7 @@ function Register() { Register
- Have an account? Log In + Have an account? Login
diff --git a/frontend-next/src/components/app/datatypes.js b/frontend-next/src/components/app/datatypes.js index ab5469d..a6b95e6 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 }) {
- + {chatObj.user} - + : {chatObj.body}
@@ -73,13 +73,11 @@ export function SystemMessage({ chatObj }) {
- + {chatObj.user} - + {" "} has {chatObj.body} the room.
@@ -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..ea4e72b 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() { @@ -83,9 +84,9 @@ export function Header({ return (
- + - +
{mainTab == "chat" && isMyRoom == false && ( @@ -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 - +
);