Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): Add redux context ui (#19807)
- Loading branch information
1 parent
4ca2cee
commit a9471ac
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/sentry/static/sentry/app/components/events/contexts/redux.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react'; | ||
|
||
import {t} from 'app/locale'; | ||
import ContextBlock from 'app/components/events/contexts/contextBlock'; | ||
import {KeyValueListData} from 'app/components/events/interfaces/keyValueList/types'; | ||
import ClippedBox from 'app/components/clippedBox'; | ||
|
||
type Props = { | ||
alias: string; | ||
data: Record<string, any>; | ||
}; | ||
|
||
class ReduxContextType extends React.Component<Props> { | ||
getKnownData(): KeyValueListData[] { | ||
return [ | ||
{ | ||
key: 'value', | ||
subject: t('Latest State'), | ||
value: this.props.data, | ||
}, | ||
]; | ||
} | ||
|
||
render() { | ||
return ( | ||
<ClippedBox clipHeight={250}> | ||
<ContextBlock knownData={this.getKnownData()} /> | ||
</ClippedBox> | ||
); | ||
} | ||
} | ||
|
||
export default ReduxContextType; |