Skip to content

Commit

Permalink
add eslint comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hoon610 committed Oct 6, 2023
1 parent f951e6c commit 5f44863
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 58 deletions.
36 changes: 17 additions & 19 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
import './App.css';
import Header from './Header';
import Sidebar from './Sidebar';
import Feed from './Feed';
import Widgets from './Widgets';
import Login from './Login';
import { useStateValue } from './StateProvider';

import "./App.css";
import Header from "./Header";
import Sidebar from "./Sidebar";
import Feed from "./Feed";
import Widgets from "./Widgets";
import Login from "./Login";
import { useStateValue } from "./StateProvider";

function App() {
const [{ user }, dispatch] = useStateValue();
// eslint-disable-next-line no-unused-vars
return (
<div className="app">
{!user ? (<Login/>) : (
{!user ? (
<Login />
) : (
<>
<Header />
<Header />

<div className="app__body">
<Sidebar />
<Feed />
<Widgets/>

</div>
<div className="app__body">
<Sidebar />
<Feed />
<Widgets />
</div>
</>
)}



</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { useStateValue } from "./StateProvider";
import logo1 from "./assets/logo1.png";
function Header() {
const [{ user }, dispatch] = useStateValue();
// eslint-disable-next-line no-unused-vars
return (
<div className="header">
<div className="header__left">
Expand Down
1 change: 1 addition & 0 deletions src/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import logo1 from "./assets/logo1.png";

function Login() {
const [state, dispatch] = useStateValue();
// eslint-disable-next-line no-unused-vars

const signIn = () => {
auth
Expand Down
1 change: 1 addition & 0 deletions src/MessageSender.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { serverTimestamp } from "firebase/firestore"; // Import serverTimestamp

function MessageSender() {
const [{ user }, dispatch] = useStateValue();
// eslint-disable-next-line no-unused-vars
const [input, setInput] = useState("");
const [imageUrl, setImageUrl] = useState("");
const MAX_CHARACTERS = 350;
Expand Down
43 changes: 22 additions & 21 deletions src/Sidebar.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
import React from 'react'
import "./Sidebar.css"
import SidebarRow from './SidebarRow'
import EmojiFlagsIcon from '@mui/icons-material/EmojiFlags';
import PeopleIcon from '@mui/icons-material/People';
import ChatIcon from '@mui/icons-material/Chat';
import StorefrontIcon from '@mui/icons-material/Storefront';
import VideoLibraryIcon from '@mui/icons-material/VideoLibrary';
import ExpandMoreOutlinedIcon from '@mui/icons-material/ExpandMoreOutlined';
import { useStateValue } from './StateProvider';
import React from "react";
import "./Sidebar.css";
import SidebarRow from "./SidebarRow";
import EmojiFlagsIcon from "@mui/icons-material/EmojiFlags";
import PeopleIcon from "@mui/icons-material/People";
import ChatIcon from "@mui/icons-material/Chat";
import StorefrontIcon from "@mui/icons-material/Storefront";
import VideoLibraryIcon from "@mui/icons-material/VideoLibrary";
import ExpandMoreOutlinedIcon from "@mui/icons-material/ExpandMoreOutlined";
import { useStateValue } from "./StateProvider";

function Sidebar() {
const [{user}, dispatch] = useStateValue();
const [{ user }, dispatch] = useStateValue();
// eslint-disable-next-line no-unused-vars
return (
<div className='sidebar'>
<SidebarRow src={user.photoURL} title= {user.displayName}/>
<SidebarRow Icon={EmojiFlagsIcon} title='Pages' />
<SidebarRow Icon={PeopleIcon} title='Friends' />
<SidebarRow Icon={ChatIcon} title='Messenger' />
<SidebarRow Icon={StorefrontIcon} title='Marketplace' />
<SidebarRow Icon={VideoLibraryIcon} title='Videos' />
<SidebarRow Icon={ExpandMoreOutlinedIcon} title='Marketplace' />
<div className="sidebar">
<SidebarRow src={user.photoURL} title={user.displayName} />
<SidebarRow Icon={EmojiFlagsIcon} title="Pages" />
<SidebarRow Icon={PeopleIcon} title="Friends" />
<SidebarRow Icon={ChatIcon} title="Messenger" />
<SidebarRow Icon={StorefrontIcon} title="Marketplace" />
<SidebarRow Icon={VideoLibraryIcon} title="Videos" />
<SidebarRow Icon={ExpandMoreOutlinedIcon} title="Marketplace" />
</div>
)
);
}

export default Sidebar
export default Sidebar;
37 changes: 19 additions & 18 deletions src/firebase.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import firebase from 'firebase/compat/app'; // Import Firebase using compat
import 'firebase/compat/auth'; // Import the Firebase services you need using compat
import 'firebase/compat/firestore';
import { getFirestore } from 'firebase/firestore';
import firebase from "firebase/compat/app"; // Import Firebase using compat
import "firebase/compat/auth"; // Import the Firebase services you need using compat
import "firebase/compat/firestore";
import { getFirestore } from "firebase/firestore";
// eslint-disable-next-line no-unused-vars

const firebaseConfig = {
apiKey: "AIzaSyAm86xnostTa8ZskL4NT-2stZD33Au_9-U",
authDomain: "facebook-clone-e6df9.firebaseapp.com",
projectId: "facebook-clone-e6df9",
storageBucket: "facebook-clone-e6df9.appspot.com",
messagingSenderId: "459541541813",
appId: "1:459541541813:web:07c184bf5faa53de8b9ffc",
measurementId: "G-H9BRTSTB6G"
};
apiKey: "AIzaSyAm86xnostTa8ZskL4NT-2stZD33Au_9-U",
authDomain: "facebook-clone-e6df9.firebaseapp.com",
projectId: "facebook-clone-e6df9",
storageBucket: "facebook-clone-e6df9.appspot.com",
messagingSenderId: "459541541813",
appId: "1:459541541813:web:07c184bf5faa53de8b9ffc",
measurementId: "G-H9BRTSTB6G",
};

const firebaseApp = firebase.initializeApp(firebaseConfig);
const db = firebaseApp.firestore();
const auth = firebase.auth();
const provider = new firebase.auth.GoogleAuthProvider();
const firebaseApp = firebase.initializeApp(firebaseConfig);
const db = firebaseApp.firestore();
const auth = firebase.auth();
const provider = new firebase.auth.GoogleAuthProvider();

export { auth, provider };
export default db;
export { auth, provider };
export default db;

0 comments on commit 5f44863

Please sign in to comment.