Skip to content

Commit

Permalink
Restyle update (#1263)
Browse files Browse the repository at this point in the history
* Restyled by clang-format

* Restyled by prettier

* Restyled by shfmt

* Restyled by whitespace

---------

Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
restyled-io[bot] and restyled-commits committed Sep 18, 2023
1 parent 79d1b2b commit 2834096
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit "$1"
npx --no -- commitlint --edit "$1"
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<your-account-username>/<your-forked-project>.git`
`$ git clone https://github.com/<your-account-username>/<your-forked-project>.git`
Now you have the project on your local machine.

### ADD A REMOTE (UPSTREAM) TO ORIGINAL PROJECT REPOSITORY
Expand Down
6 changes: 3 additions & 3 deletions src/assets/sounds/index.js
Original file line number Diff line number Diff line change
@@ -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 };
5 changes: 3 additions & 2 deletions src/components/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import NotFound from "../pages/NotFound";

import Caption from "./Caption";
import ChatBox from "./CommunityChat";
import EditProfile from "./EditProfile";
Expand All @@ -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";
Expand All @@ -18,6 +19,7 @@ export {
Caption,
ChatBox,
EditProfile,
FriendsComponent,
GuestSignInBtn,
GuestSignUpBtn,
ImgUpload,
Expand All @@ -29,7 +31,6 @@ export {
SideBar,
StoryView,
Suggestion,
FriendsComponent,
};

export default Post;
7 changes: 4 additions & 3 deletions src/js/postFn.js
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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),
Expand Down
1 change: 1 addition & 0 deletions src/js/signIn.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { auth, db, facebookProvider, googleProvider } from "../lib/firebase";

import { playErrorSound, playSuccessSound } from "./sounds";

const signInWithOAuth = (e, enqueueSnackbar, navigate, google = true) => {
Expand Down
2 changes: 1 addition & 1 deletion src/js/userData.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/pages/index.js
Original file line number Diff line number Diff line change
@@ -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,
};
2 changes: 1 addition & 1 deletion src/reusableComponents/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 8 additions & 2 deletions src/reusableComponents/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
@@ -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({
Expand Down

0 comments on commit 2834096

Please sign in to comment.