Update Import Paths

This commit is contained in:
2024-02-19 08:17:17 +00:00
parent c6056c385b
commit f19b09c5fd
5 changed files with 5 additions and 8 deletions
@@ -1,6 +1,6 @@
// lib/firebase-admin-config.js
import { initializeApp, getApps, cert } from "firebase-admin/app";
import serviceAccount from "../../../firebase-admin-key"
import serviceAccount from "../../../../firebase-admin-key"
export function customInitApp() {
if (getApps().length <= 0) {
@@ -1,6 +1,6 @@
import { initializeApp, getApps, getApp } from "firebase/app";
import { getAuth } from "firebase/auth";
import firebaseConfigFile from "../../../firebase-config"
import firebaseConfigFile from "../../../../firebase-config"
var firebaseConfig = firebaseConfigFile;
+2 -2
View File
@@ -4,8 +4,8 @@ import { NextResponse } from "next/server";
import { auth } from "firebase-admin";
import { signInWithEmailAndPassword } from "firebase/auth";
// Lib Imports
import { auth as authConfig } from "../../../lib/firebase-config";
import { customInitApp } from "../../../lib/firebase-admin";
import { auth as authConfig } from "../firebase-config";
import { customInitApp } from "../firebase-admin";
// Needs to "init" on each call to the API
customInitApp();
+1 -1
View File
@@ -1,6 +1,6 @@
// Import necessary functions
import { createUserWithEmailAndPassword } from "firebase/auth";
import { auth } from "../../../lib/firebase-config";
import { auth } from "../firebase-config";
import { NextResponse } from "next/server";
// Function to register a new user using Firebase Authentication
-3
View File
@@ -1,7 +1,4 @@
"use client";
import {createUserWithEmailAndPassword, getRedirectResult,signInWithRedirect,} from "firebase/auth";
import { useEffect, useState } from "react";
import { auth, provider } from "../../lib/firebase-config";
import { useForm } from "react-hook-form";
import { useRouter } from "next/navigation";
import "../globals.css"