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

Numerous changes and refactoring #32

Merged
merged 10 commits into from
Oct 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 💡 General Feature Request
description: Have a new idea/feature for Milan? Please suggest!
description: Have a new idea/feature for DummyGram? Please suggest!
title: "[FEATURE] <description>"
labels: ["enhancement"]
body:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deployreact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ jobs:
node-version: '16'
cache: 'npm'

# Not using npm? Change `npm ci` to `yarn install` or `pnpm i`
# Not using npm? Change `npm ci` to `yarn install` or `npm i`
- name: Install dependencies
run: npm ci
run: npm i

# Not using npm? Change `npm run build` to `yarn build` or `pnpm run build`
# Not using npm? Change `npm run build` to `yarn build` or `npm run build`
- name: Build React
run: npm run build --if-present

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./build
path: ./dist

deploy:
environment:
Expand Down
6 changes: 0 additions & 6 deletions .vscode/settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion firebase.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"hosting": {
"public": "build",
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
Expand Down
File renamed without changes
11 changes: 3 additions & 8 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,14 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="favicon-logo.png" />
<link rel="icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Instagram clone created using react and firebase"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/favicon.ico" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand All @@ -24,7 +19,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>DummyGram!</title>
<title>DummyGram</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
1 change: 0 additions & 1 deletion public/vite.svg

This file was deleted.

10 changes: 5 additions & 5 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ function App() {
const [password, setPassword] = useState("");
const [user, setUser] = useState(null);
const [signingUp, setSigningUp] = useState(false);
const [logginIn, setLogginIn] = useState(false);
const [loggingIn, setLoggingIn] = useState(false);
const [loadingPosts, setLoadingPosts] = useState(true);
const processingAuth = useMemo(
() => logginIn || signingUp || loadingPosts,
[logginIn, signingUp, loadingPosts]
() => loggingIn || signingUp || loadingPosts,
[loggingIn, signingUp, loadingPosts]
);

useEffect(() => {
Expand Down Expand Up @@ -103,7 +103,7 @@ function App() {

const signIn = (e) => {
e.preventDefault();
setLogginIn(true);
setLoggingIn(true);
auth
.signInWithEmailAndPassword(email, password)
.then(() => {
Expand All @@ -112,7 +112,7 @@ function App() {
})
.catch((error) => alert(error.message))
.finally(() => {
setLogginIn(false);
setLoggingIn(false);
});
};

Expand Down
Binary file removed src/assets/logodark.png
Binary file not shown.
1 change: 0 additions & 1 deletion src/assets/react.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/ImgUpload.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function ImgUpload(props) {
caption: caption,
imageUrl: url,
username: props.username,
avatar: "avatar",
avatar: props.avatar,
});
setProgress(0);
setCaption("");
Expand Down
4 changes: 2 additions & 2 deletions src/components/Post.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect } from "react";
import { Avatar } from "@mui/material";
import Avatar from "@mui/material/Avatar";
import { db } from "../lib/firebase";
import firebase from "firebase/compat/app";

Expand Down Expand Up @@ -55,7 +55,7 @@ function Post(prop) {
<div className="post__comments">
{comments.map((userComment) => (
<p key={userComment.id}>
<strong>{userComment.content.username}</strong>{" "}
<strong>{userComment.content.username}</strong>
{userComment.content.text}
</p>
))}
Expand Down