diff --git a/Web/public/.idea/indexLayout.xml b/Web/public/.idea/indexLayout.xml
new file mode 100644
index 0000000..7b08163
--- /dev/null
+++ b/Web/public/.idea/indexLayout.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Web/public/.idea/vcs.xml b/Web/public/.idea/vcs.xml
new file mode 100644
index 0000000..b2bdec2
--- /dev/null
+++ b/Web/public/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Web/public/.idea/workspace.xml b/Web/public/.idea/workspace.xml
index bb86022..422d9fe 100644
--- a/Web/public/.idea/workspace.xml
+++ b/Web/public/.idea/workspace.xml
@@ -4,7 +4,9 @@
-
+
+
+
@@ -13,26 +15,26 @@
-
+ {
+ "associatedIndex": 6
+}
- {
+ "keyToString": {
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "git-widget-placeholder": "main",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "vue.rearranger.settings.migration": "true"
}
-}]]>
+}
@@ -42,6 +44,7 @@
1739721691032
+
diff --git a/Web/public/js/profile.reza.js b/Web/public/js/profile.reza.js
new file mode 100644
index 0000000..0a889ea
--- /dev/null
+++ b/Web/public/js/profile.reza.js
@@ -0,0 +1,37 @@
+// i literally dk what im doing :,)
+const loadProfile = () => {
+ const urlParams = new URLSearchParams(window.location.search);
+ const uid = urlParams.get("uid");
+
+ const usernameText = document.getElementById("name");
+ const emailText = document.getElementById("email");
+
+ if (uid) {
+ console.log("Fetching user info", uid);
+
+ firebase.firestore().collection("users").doc(uid).get()
+ .then((doc) => {
+ if (doc.exists) {
+ // If the user data exists
+ const userData = doc.data();
+
+ usernameText.innerHTML = userData.displayName
+ emailText.innerHTML = userData.email
+
+ } else {
+ // If no user is found
+ console.error("User not found!");
+ usernameText.innerHTML = "User not found.";
+ emailText.innerHTML = "No user data available.";
+ }
+ })
+
+ } else {
+ // If no UID is found in the URL
+ console.error("No UID found");
+ usernameText.innerHTML = "Whoops!";
+ emailText.innerHTML = "No user to display.";
+ }
+};
+
+window.onload = loadProfile;
\ No newline at end of file