diff --git a/.husky/commit-msg b/.husky/commit-msg index 42a70e424..b56767669 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -npx --no -- commitlint --edit "$1" \ No newline at end of file +npx --no -- commitlint --edit "$1" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d9ad60ef3..45d6ee0c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,7 +60,7 @@ Open Source projects always have something to workon and improves with each new You have forked the project you want to contribute to your github account. To get this project on your development machine we use clone command of git. -`$ git clone https://github.com//.git` +`$ git clone https://github.com//.git` Now you have the project on your local machine. ### ADD A REMOTE (UPSTREAM) TO ORIGINAL PROJECT REPOSITORY diff --git a/src/assets/sounds/index.js b/src/assets/sounds/index.js index 81ff2dc07..db08c1724 100644 --- a/src/assets/sounds/index.js +++ b/src/assets/sounds/index.js @@ -1,7 +1,7 @@ import backBtnSound from "./backBtn.mp3"; import errorSound from "./error.mp3"; -import successSound from "./success.mp3"; -import lightOnSound from "./lightOn.mp3"; import lightOffSound from "./lightOff.mp3"; +import lightOnSound from "./lightOn.mp3"; +import successSound from "./success.mp3"; -export { backBtnSound, errorSound, successSound, lightOnSound, lightOffSound }; +export { backBtnSound, errorSound, lightOffSound, lightOnSound, successSound }; diff --git a/src/components/index.js b/src/components/index.js index bbe7b92a8..deede940a 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -1,3 +1,5 @@ +import NotFound from "../pages/NotFound"; + import Caption from "./Caption"; import ChatBox from "./CommunityChat"; import EditProfile from "./EditProfile"; @@ -6,7 +8,6 @@ import GuestSignInBtn from "./Guest/GuestSignInBtn"; import GuestSignUpBtn from "./Guest/GuestSignUpBtn"; import ImgUpload from "./ImgUpload"; import Navbar from "./Navbar"; -import NotFound from "../pages/NotFound"; import Notifications from "./Notification"; import Post from "./Post"; import ReadMore from "./ReadMore"; @@ -18,6 +19,7 @@ export { Caption, ChatBox, EditProfile, + FriendsComponent, GuestSignInBtn, GuestSignUpBtn, ImgUpload, @@ -29,7 +31,6 @@ export { SideBar, StoryView, Suggestion, - FriendsComponent, }; export default Post; diff --git a/src/js/postFn.js b/src/js/postFn.js index 5cebdcb8e..d7450df0b 100644 --- a/src/js/postFn.js +++ b/src/js/postFn.js @@ -1,7 +1,8 @@ +import firebase from "firebase/compat/app"; + import { db, storage } from "../lib/firebase"; -import { playErrorSound, playSuccessSound } from "./sounds"; -import firebase from "firebase/compat/app"; +import { playErrorSound, playSuccessSound } from "./sounds"; export const deletePost = async ( uid, @@ -13,7 +14,7 @@ export const deletePost = async ( try { await db .runTransaction(async (transaction) => { - //Delete doc ref from user doc + // Delete doc ref from user doc const docRef = db.collection("users").doc(uid); transaction.update(docRef, { posts: firebase.firestore.FieldValue.arrayRemove(postId), diff --git a/src/js/signIn.js b/src/js/signIn.js index 9c6bad6fa..e3a5e29fe 100644 --- a/src/js/signIn.js +++ b/src/js/signIn.js @@ -1,4 +1,5 @@ import { auth, db, facebookProvider, googleProvider } from "../lib/firebase"; + import { playErrorSound, playSuccessSound } from "./sounds"; const signInWithOAuth = (e, enqueueSnackbar, navigate, google = true) => { diff --git a/src/js/userData.js b/src/js/userData.js index e7d1607b1..bd50ae698 100644 --- a/src/js/userData.js +++ b/src/js/userData.js @@ -1,4 +1,4 @@ -import { db, auth } from "../lib/firebase"; +import { auth, db } from "../lib/firebase"; export default async function getUserSessionData(getRef) { const user = auth?.currentUser; diff --git a/src/pages/index.js b/src/pages/index.js index 19c43dbba..282a4a248 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,25 +1,25 @@ -import About from "./FooterPages/About"; import ChatPage from "./Chat"; +import About from "./FooterPages/About"; import Contributor from "./FooterPages/ContributorPage"; import Feedback from "./FooterPages/Feedback"; import Guidelines from "./FooterPages/Guidelines"; import HelpCenter from "./FooterPages/HelpCenter"; +import Friends from "./Friends"; import LoginScreen from "./Login"; import PostView from "./PostView"; import Profile from "./Profile"; import SignupScreen from "./Signup"; -import Friends from "./Friends"; export { About, ChatPage, Contributor, Feedback, + Friends, Guidelines, HelpCenter, LoginScreen, PostView, Profile, SignupScreen, - Friends, }; diff --git a/src/reusableComponents/index.js b/src/reusableComponents/index.js index f9190ec11..1bb4dfe41 100644 --- a/src/reusableComponents/index.js +++ b/src/reusableComponents/index.js @@ -11,8 +11,8 @@ import PostSkeleton from "./PostSkeleton"; import Scroll from "./Scroll"; import ShareModal from "./ShareModal"; import SnackBar from "./SnackBar"; -import ViewsCounter from "./Views"; import validate from "./validation"; +import ViewsCounter from "./Views"; export { AnimatedButton, diff --git a/src/reusableComponents/validation.js b/src/reusableComponents/validation.js index 68810410f..59bc91522 100644 --- a/src/reusableComponents/validation.js +++ b/src/reusableComponents/validation.js @@ -6,14 +6,20 @@ const validate = { if (!value) return { name: true, nameError: "Name field cannot be empty" }; else { return value.length < 6 - ? { name: true, nameError: "Name must be atleast 6 characters long." } + ? { + name: true, + nameError: "Name must be atleast 6 characters long.", + } : { name: false, nameError: false }; } }, email: (value) => { return emailRegex.test(value) ? { email: false, emailError: false } - : { email: true, emailError: "Please enter a valid email address" }; + : { + email: true, + emailError: "Please enter a valid email address", + }; }, password: (value) => { diff --git a/vite.config.js b/vite.config.js index 482833f6b..1660e1143 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,5 +1,5 @@ -import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; +import { defineConfig } from "vite"; // https://vitejs.dev/config/ export default defineConfig({