File tree 2 files changed +3
-4
lines changed
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
if ( document . location . href . indexOf ( "/member/" ) > - 1 )
2
2
{
3
3
var username = document . location . href . split ( "/member/" ) [ 1 ] . split ( "/" ) [ 0 ] ;
4
- username = "sirjanhansda" ;
5
4
fetch ( `https://api.airtable.com/v0/appHwUzo4ARCQQlwr/Profiles?filterByFormula=username='${ username } '` , {
6
5
method : "GET" ,
7
6
headers : {
Original file line number Diff line number Diff line change @@ -17,14 +17,14 @@ fetch(
17
17
18
18
function add_data ( data ) {
19
19
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 ) ) ;
21
21
}
22
22
}
23
23
24
- function create_person ( data , id ) {
24
+ function create_person ( data ) {
25
25
let link = document . createElement ( "a" ) ;
26
26
link . className = "profile-link" ;
27
- link . href = "/profile.html?id= " + id ;
27
+ link . href = "/member/ " + data . Username ;
28
28
link . className = "person-element" ;
29
29
data . Photo = data . Photo ?? [ { url : "../img/user.png" } ] ;
30
30
link . innerHTML = `<div class="person-profile"
You can’t perform that action at this time.
0 commit comments