Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kelvin branch #1

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Kelvin branch #1

wants to merge 7 commits into from

Conversation

kywk23
Copy link

@kywk23 kywk23 commented Dec 11, 2023

No description provided.

import LoginSignUp from "./Components/LoginSignup";
import PostDisplay from "./Components/PostDisplay";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import Navbar from "./Components/Navbar";

function App() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work lifting up the required states

});
}, []);
const [isLoggedIn, setIsLoggedIn] = useState(false);
const [user, setUser] = useState({});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice setup of the createBrowserRouter, Consider using nested routes so you dont need to use navbar multiple times

</>
<div className="bg-gradient-to-b from-cyan-300 to-white-100 shadow-2xl dark:bg-grey-400 px-3 py-2 rounded-lg">
<h1 className="text-2xl font-bold text-rose-500 mb-4">Rocketgram</h1>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally and conventionally the RouterProvider is a self closing element:

@@ -0,0 +1,52 @@
import { useState } from "react";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work making this into a single component!
Nice use of tailwind styling

@@ -0,0 +1,10 @@
import { Link } from "react-router-dom";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use conditionals and props to hide the signup and login button if they are logged in

console.log("File Input:", fileInputFile);
await uploadBytes(storageRefInstance, fileInputFile);
const url = await getDownloadURL(storageRefInstance);
set(newMessageRef, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment and Timestamp should by convention be lower cased.

<div className="card">
{Object.keys(user).length !== 0 ? <p> welcome, {user.email} </p> : null}
<br />
{IsLoggedIn ? (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically would work better on the navigation bar, either show logout button or signup/ signin button.
Nice utilisation of tailwind CSS properties

{/* SUB-SECTION: IMG RENDER */}
<div>
<h2 className="p-2 text-lg">Time & Date</h2>
<ul>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smart UI thinking to show the newest post first.

@@ -0,0 +1,24 @@
// Import the functions you need from the SDKs you need
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great and conventional setup of firebase

@@ -0,0 +1,13 @@
/** @type {import('tailwindcss').Config} */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice start to use tailwind css for styling well done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants