From 4824422731f8a128f638322ff37ae63bb005a0fc Mon Sep 17 00:00:00 2001 From: ngjiayuan Date: Tue, 24 Oct 2023 20:45:59 +0800 Subject: [PATCH 1/2] remove firebase in FE --- frontend/src/data/data.context.tsx | 4 ++-- frontend/src/firebase/firebase.ts | 25 ------------------------- frontend/tsconfig.json | 12 +++--------- 3 files changed, 5 insertions(+), 36 deletions(-) delete mode 100644 frontend/src/firebase/firebase.ts diff --git a/frontend/src/data/data.context.tsx b/frontend/src/data/data.context.tsx index 5831cb7b..6704c0fd 100644 --- a/frontend/src/data/data.context.tsx +++ b/frontend/src/data/data.context.tsx @@ -57,9 +57,9 @@ export function DataContextProvider({ children }: DataContextProviderProps) { const getQuestions = async () => { try { setLoading(true); - + const result = await (await getAllQuestions()).data; - console.log(result) + console.log(result); setLoading(false); setQuestions(result); setResponse({ diff --git a/frontend/src/firebase/firebase.ts b/frontend/src/firebase/firebase.ts deleted file mode 100644 index 7aefdef6..00000000 --- a/frontend/src/firebase/firebase.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Import the functions you need from the SDKs you need -import { initializeApp } from "firebase/app"; -import { getAuth } from "firebase/auth"; -import { getFirestore } from "firebase/firestore"; -import { getStorage } from "firebase/storage"; -// TODO: Add SDKs for Firebase products that you want to use -// https://firebase.google.com/docs/web/setup#available-libraries - -// Your web app's Firebase configuration -// For Firebase JS SDK v7.20.0 and later, measurementId is optional -const firebaseConfig = { - apiKey: process.env.REACT_APP_FIREBASE_API_KEY, - authDomain: "peerprep-d7af2.firebaseapp.com", - projectId: "peerprep-d7af2", - storageBucket: "peerprep-d7af2.appspot.com", - messagingSenderId: "852795173750", - appId: "1:852795173750:web:b1aed6d65dc6d4cb566857", - measurementId: "G-NZSVYREFLC", -}; - -// Initialize Firebase -const app = initializeApp(firebaseConfig); -export const auth = getAuth(app); -export const db = getFirestore(app); -export const storage = getStorage(app); diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 3701f750..7d655824 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, @@ -21,10 +17,8 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, - "types":["@mui/types"] , + "types": ["@mui/types", "node"], "jsx": "react-jsx" }, - "include": [ - "src" - ] + "include": ["src"] } From 12272dbe13635b432e4d977033c56fce70898a00 Mon Sep 17 00:00:00 2001 From: ngjiayuan Date: Tue, 24 Oct 2023 22:00:17 +0800 Subject: [PATCH 2/2] fix wrong folder --- {workflows => .github/workflows}/pullrequest.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {workflows => .github/workflows}/pullrequest.yml (100%) diff --git a/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml similarity index 100% rename from workflows/pullrequest.yml rename to .github/workflows/pullrequest.yml