@@ -14,9 +14,6 @@ import {
1414import FieldGroup from 'sentry/components/forms/fieldGroup' ;
1515import LoadingError from 'sentry/components/loadingError' ;
1616import LoadingIndicator from 'sentry/components/loadingIndicator' ;
17- import Panel from 'sentry/components/panels/panel' ;
18- import PanelBody from 'sentry/components/panels/panelBody' ;
19- import PanelHeader from 'sentry/components/panels/panelHeader' ;
2017import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle' ;
2118import { t , tct } from 'sentry/locale' ;
2219import type { OrgAuthToken } from 'sentry/types/user' ;
@@ -141,31 +138,32 @@ function AuthTokenDetailsForm({token}: {token: OrgAuthToken}) {
141138
142139 return (
143140 < form . AppForm form = { form } >
144- < form . AppField name = "name" >
145- { field => (
146- < field . Layout . Row
147- label = { t ( 'Name' ) }
148- hintText = { t ( 'A name to help you identify this token.' ) }
149- required
150- >
151- < field . Input value = { field . state . value } onChange = { field . handleChange } />
152- </ field . Layout . Row >
153- ) }
154- </ form . AppField >
155-
156- < FieldGroup
157- label = { t ( 'Token' ) }
158- help = { t ( 'You can only view the token once after creation.' ) }
159- >
160- < div > { tokenPreview ( token . tokenLastCharacters || '****' ) } </ div >
161- </ FieldGroup >
162-
163- < FieldGroup
164- label = { t ( 'Scopes' ) }
165- help = { t ( 'You cannot change the scopes of an existing token.' ) }
166- >
167- < div > { token . scopes . slice ( ) . sort ( ) . join ( ', ' ) } </ div >
168- </ FieldGroup >
141+ < form . FieldGroup title = { t ( 'Organization Token Details' ) } >
142+ < form . AppField name = "name" >
143+ { field => (
144+ < field . Layout . Row
145+ label = { t ( 'Name' ) }
146+ hintText = { t ( 'A name to help you identify this token.' ) }
147+ required
148+ >
149+ < field . Input value = { field . state . value } onChange = { field . handleChange } />
150+ </ field . Layout . Row >
151+ ) }
152+ </ form . AppField >
153+ < FieldGroup
154+ label = { t ( 'Token' ) }
155+ help = { t ( 'You can only view the token once after creation.' ) }
156+ >
157+ < div > { tokenPreview ( token . tokenLastCharacters || '****' ) } </ div >
158+ </ FieldGroup >
159+
160+ < FieldGroup
161+ label = { t ( 'Scopes' ) }
162+ help = { t ( 'You cannot change the scopes of an existing token.' ) }
163+ >
164+ < div > { token . scopes . slice ( ) . sort ( ) . join ( ', ' ) } </ div >
165+ </ FieldGroup >
166+ </ form . FieldGroup >
169167
170168 < Flex justify = "end" gap = "md" padding = "md" >
171169 < Button onClick = { handleGoBack } > { t ( 'Cancel' ) } </ Button >
@@ -209,22 +207,17 @@ function OrganizationAuthTokensDetails() {
209207 }
210208 ) }
211209 </ TextBlock >
212- < Panel >
213- < PanelHeader > { t ( 'Organization Token Details' ) } </ PanelHeader >
214-
215- < PanelBody >
216- { isError && (
217- < LoadingError
218- message = { t ( 'Failed to load organization token.' ) }
219- onRetry = { refetchToken }
220- />
221- ) }
222210
223- { isPending && < LoadingIndicator /> }
211+ { isError && (
212+ < LoadingError
213+ message = { t ( 'Failed to load organization token.' ) }
214+ onRetry = { refetchToken }
215+ />
216+ ) }
217+
218+ { isPending && < LoadingIndicator /> }
224219
225- { ! isPending && ! isError && token && < AuthTokenDetailsForm token = { token } /> }
226- </ PanelBody >
227- </ Panel >
220+ { ! isPending && ! isError && token && < AuthTokenDetailsForm token = { token } /> }
228221 </ div >
229222 ) ;
230223}
0 commit comments