Skip to content

Commit

Permalink
Merge pull request #4 from utadatathon/sam
Browse files Browse the repository at this point in the history
registraions
  • Loading branch information
thatscrazzyy authored Feb 10, 2025
2 parents dc6435a + f083433 commit 6394833
Show file tree
Hide file tree
Showing 8 changed files with 504 additions and 157 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ yarn-error.log*

# env files (can opt-in for committing if needed)
.env*
.env.local

# vercel
.vercel
Expand Down
9 changes: 9 additions & 0 deletions cors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"origin": ["http://localhost:3000","https://utadatathon.com"],
"method": ["GET", "POST", "PUT", "DELETE"],
"maxAgeSeconds": 3600,
"responseHeader": ["Content-Type"]
}
]

39 changes: 39 additions & 0 deletions firebase.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// firebase/firebase.ts
import { initializeApp } from "firebase/app";
import { getFirestore, collection, addDoc, where, getDocs, serverTimestamp, query } from "firebase/firestore";
import { getStorage, ref, uploadBytes, getDownloadURL } from "firebase/storage";
import { getAuth, GoogleAuthProvider, signOut } from "firebase/auth";

// Replace these with your Firebase project config values.
const firebaseConfig = {
apiKey: process.env.NEXT_PUBLIC_API_KEY,
authDomain: process.env.NEXT_PUBLIC_AUTH_DOMAIN,
projectId: process.env.NEXT_PUBLIC_PROJECT_ID,
storageBucket: process.env.NEXT_PUBLIC_STORAGE_BUCKET,
messagingSenderId: process.env.NEXT_PUBLIC_MESSAGING_SENDER_ID,
appId: process.env.NEXT_PUBLIC_APP_ID,
measurementId: process.env.NEXT_PUBLIC_MEASUREMENT_ID,
};
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
const storage = getStorage(app);
const auth = getAuth(app);
const provider = new GoogleAuthProvider();

export {
app,
db,
storage,
auth,
provider,
ref,
uploadBytes,
getDownloadURL,
collection,
addDoc,
where,
getDocs,
serverTimestamp,
query,
signOut
};
276 changes: 171 additions & 105 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"clsx": "^2.1.1",
"firebase": "^11.2.0",
"firebase": "^11.3.0",
"next": "15.0.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
Expand Down
23 changes: 23 additions & 0 deletions src/app/components/SuccessScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// components/SuccessScreen.tsx
const SuccessScreen = () => {
return (
<div className="fixed inset-0 bg-gradient-to-r from-blue-500 to-purple-600 flex items-center justify-center">
<div className="bg-white p-8 rounded-lg shadow-2xl text-center max-w-lg mx-4">
<h2 className="text-3xl font-bold text-gray-800 mb-4">
Thank You for Registering!
</h2>
<p className="text-gray-600 text-lg mb-6">
Your application has been successfully submitted. We&apos;ll review it and get back to you soon.
</p>
<div className="animate-bounce text-5xl mb-6">
🎉
</div>
<p className="text-sm text-gray-500">
Check your email for further updates.
</p>
</div>
</div>
);
};

export default SuccessScreen;
20 changes: 20 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,23 @@ body {
color: red;
margin-bottom: 1rem;
}

.auth-form {
max-width: 300px;
margin: 20px auto;
padding: 20px;
background: white;
border-radius: 8px;
}

.auth-form input {
width: 100%;
padding: 8px;
margin: 8px 0;
}

.auth-form button {
width: 100%;
padding: 8px;
margin: 4px 0;
}
Loading

0 comments on commit 6394833

Please sign in to comment.