11import T from 'prop-types'
22import Table from '../../../components/tables/table'
33import { useState } from 'react'
4- import join from 'url-join'
54
65import Pagination from '../../../components/pagination'
76import { serverRuntimeConfig } from '../../../../next.config.js'
87import * as R from 'ramda'
98import SearchInput from '../../../components/tables/search-input'
10- import Button from '../../../components/button'
11- const URL = process . env . APP_URL
9+ import ExternalProfileButton from '../../../components/external-profile-button'
1210const { DEFAULT_PAGE_SIZE } = serverRuntimeConfig
1311
1412function MembersTable ( { rows : allRows , onRowClick } ) {
@@ -27,72 +25,9 @@ function MembersTable({ rows: allRows, onRowClick }) {
2725 key : 'External Profiles' ,
2826 render : ( { name } ) => (
2927 < >
30- < Button
31- onClick = { ( e ) => {
32- e . stopPropagation ( )
33- window . open (
34- `https://www.openstreetmap.org/user/${ name } ` ,
35- '_blank' ,
36- 'noreferrer'
37- )
38- } }
39- flat
40- size = 'small'
41- className = 'unstyled small'
42- title = 'View profile on OSM'
43- >
44- < img
45- src = { `${ join ( URL , `/static/osm_logo.png` ) } ` }
46- alt = 'OSM Logo'
47- width = '16'
48- height = '16'
49- />
50- OSM
51- </ Button >
52- < Button
53- onClick = { ( e ) => {
54- e . stopPropagation ( )
55- window . open (
56- `https://hdyc.neis-one.org/?${ name } ` ,
57- '_blank' ,
58- 'noreferrer'
59- )
60- } }
61- flat
62- size = 'small'
63- className = 'unstyled small'
64- title = 'View profile on HDYC'
65- >
66- < img
67- src = { `${ join ( URL , `/static/neis-one-logo.png` ) } ` }
68- alt = 'How Do You Contribute Logo'
69- width = '16'
70- height = '16'
71- />
72- HDYC
73- </ Button >
74- < Button
75- onClick = { ( e ) => {
76- e . stopPropagation ( )
77- window . open (
78- `https://osmcha.org/?filters={"users":[{"label":"${ name } ","value":"${ name } "}]}` ,
79- '_blank' ,
80- 'noreferrer'
81- )
82- } }
83- flat
84- size = 'small'
85- className = 'unstyled small'
86- title = 'View profile on OSMCha'
87- >
88- < img
89- src = { `${ join ( URL , `/static/icon-osmcha-logo.svg` ) } ` }
90- alt = 'OSMCha Logo'
91- width = '16'
92- height = '16'
93- />
94- OSMCha
95- </ Button >
28+ < ExternalProfileButton type = 'osm-profile' userId = { name } />
29+ < ExternalProfileButton type = 'hdyc' userId = { name } />
30+ < ExternalProfileButton type = 'osmcha' userId = { name } />
9631 </ >
9732 ) ,
9833 } ,
0 commit comments