Skip to content

Commit e1df7ee

Browse files
committed
routing fixed
1 parent 1672a79 commit e1df7ee

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

js/404handler.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
if (document.location.href.indexOf("/member/") > -1)
22
{
33
var username = document.location.href.split("/member/")[1].split("/")[0];
4-
username = "sirjanhansda";
54
fetch(`https://api.airtable.com/v0/appHwUzo4ARCQQlwr/Profiles?filterByFormula=username='${username}'`, {
65
method: "GET",
76
headers: {

js/aboutpage.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ fetch(
1717

1818
function add_data(data) {
1919
for (let i of data) {
20-
document.getElementById("people-list").appendChild(create_person(i.fields, i.id));
20+
document.getElementById("people-list").appendChild(create_person(i.fields));
2121
}
2222
}
2323

24-
function create_person(data, id) {
24+
function create_person(data) {
2525
let link = document.createElement("a");
2626
link.className = "profile-link";
27-
link.href = "/profile.html?id=" + id;
27+
link.href = "/member/" + data.Username;
2828
link.className = "person-element";
2929
data.Photo = data.Photo??[{url: "../img/user.png"}];
3030
link.innerHTML = `<div class="person-profile"

0 commit comments

Comments
 (0)