@@ -4,6 +4,7 @@ import { ExternalButtonLink } from 'components/Button/Button'
4
4
import type { IssuerConfig } from 'config'
5
5
import { useConfig } from 'config/hooks'
6
6
import { actions } from 'features/login/loginSlice'
7
+ import { useReadCommunity } from 'hooks/data/useCommunity'
7
8
import { ChangeEvent , Fragment , ReactNode , useMemo , useState } from 'react'
8
9
import Modal from 'react-modal'
9
10
import styles from './Join.module.scss'
@@ -33,7 +34,10 @@ const RegistrationButton = ({
33
34
}
34
35
35
36
const useTabs = ( ) => {
36
- const { oidcIssuers } = useConfig ( )
37
+ const { oidcIssuers, communityId } = useConfig ( )
38
+
39
+ const community = useReadCommunity ( communityId )
40
+ const communityName = community . name || 'SolidCouch'
37
41
38
42
const tabs = useMemo (
39
43
( ) => [
@@ -42,7 +46,7 @@ const useTabs = () => {
42
46
label : 'Show me some providers!' ,
43
47
content : (
44
48
< >
45
- Here are some Pod providers that work with SolidCouch :
49
+ Here are some Pod providers that work with { communityName } :
46
50
< ul >
47
51
{ oidcIssuers
48
52
. filter ( iss => iss . registration )
@@ -148,7 +152,7 @@ const useTabs = () => {
148
152
) ,
149
153
} ,
150
154
] ,
151
- [ oidcIssuers ] ,
155
+ [ communityName , oidcIssuers ] ,
152
156
)
153
157
154
158
return tabs
@@ -158,6 +162,10 @@ export const Join = () => {
158
162
const [ modalOpen , setModalOpen ] = useState ( false )
159
163
const [ selectedTab , setSelectedTab ] = useState < string > ( )
160
164
165
+ const { communityId } = useConfig ( )
166
+ const community = useReadCommunity ( communityId )
167
+ const communityName = community . name || 'SolidCouch'
168
+
161
169
const handleTabChange = ( event : ChangeEvent < HTMLInputElement > ) => {
162
170
setSelectedTab ( event . target . value )
163
171
}
@@ -177,7 +185,7 @@ export const Join = () => {
177
185
>
178
186
< div className = { styles . container } >
179
187
< div className = { styles . content } >
180
- To join SolidCouch , you need a{ ' ' }
188
+ To join { communityName } , you need a{ ' ' }
181
189
< a
182
190
href = "https://solidproject.org/users/get-a-pod"
183
191
target = "_blank"
0 commit comments