Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
killshotxd committed Nov 3, 2023
1 parent 9d362e9 commit 7c9255a
Show file tree
Hide file tree
Showing 27 changed files with 5,606 additions and 1,169 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ dist
dist-ssr
*.local
env
.env
# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand Down
556 changes: 361 additions & 195 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
"number-to-words": "^1.2.4",
"react": "^18.2.0",
"react-chartjs-2": "^5.2.0",
"react-datepicker": "^4.21.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1",
"react-icons": "^4.10.1",
"react-loader-spinner": "^5.4.5",
"react-multi-select-component": "^4.3.4",
"react-router-dom": "^6.15.0",
"react-to-print": "^2.14.13"
"react-to-print": "^2.14.15"
},
"devDependencies": {
"@types/react": "^18.2.15",
Expand Down
1,134 changes: 666 additions & 468 deletions src/app.jsx

Large diffs are not rendered by default.

Binary file added src/assets/7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/invoiceLogo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion src/components/context/AuthContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
createUserWithEmailAndPassword,
} from "firebase/auth";
import { auth, db } from "../../../Firebase";
import { doc, setDoc } from "firebase/firestore";
import { doc, setDoc, updateDoc } from "firebase/firestore";
// create context
const AuthContext = createContext();

Expand Down Expand Up @@ -51,6 +51,7 @@ export const AuthProvider = ({ children }) => {

// SIGN UP
const signUpGoogle = async (email, password) => {
const schoolRef = doc(db, "Schools", email);
const auth = getAuth();
try {
const response = await createUserWithEmailAndPassword(
Expand All @@ -60,6 +61,13 @@ export const AuthProvider = ({ children }) => {
);
// setCurrentUser(response.user);
console.log(response);
const data = response.user;

console.log(data);
setTimeout(() => {
updateDoc(schoolRef, { uid: data.uid }, { merge: true });
}, 1000);

// localStorage.setItem("email", response?.user?.email);
// localStorage.setItem("uid", response?.user?.uid);
return response.user;
Expand Down
Loading

0 comments on commit 7c9255a

Please sign in to comment.