Skip to content

Commit 16cae59

Browse files
committed
use the textColor provided by the webcam
1 parent 5ea6e87 commit 16cae59

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

source/views/streaming/webcams.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ export class WebcamsView extends React.PureComponent<void, Props, State> {
105105
class StreamThumbnail extends React.PureComponent {
106106
props: {
107107
webcam: WebcamType,
108-
textColor: 'white' | 'black',
109108
}
110109

111110
handlePress = () => {
@@ -120,13 +119,16 @@ class StreamThumbnail extends React.PureComponent {
120119
}
121120

122121
render() {
123-
const {textColor} = this.props
124-
const {name, thumbnail, accentColor} = this.props.webcam
122+
const {
123+
name,
124+
thumbnail,
125+
accentColor,
126+
textColor,
127+
} = this.props.webcam
125128

126129
const [r, g, b] = accentColor
127130
const baseColor = `rgba(${r}, ${g}, ${b}, 1)`
128131
const startColor = `rgba(${r}, ${g}, ${b}, 0.1)`
129-
const actualTextColor = c[textColor]
130132

131133

132134
return (
@@ -143,7 +145,7 @@ class StreamThumbnail extends React.PureComponent {
143145
colors={[startColor, baseColor]}
144146
locations={[0, 0.8]}
145147
>
146-
<Text style={[styles.titleText, {color: actualTextColor}]}>
148+
<Text style={[styles.titleText, {color: textColor}]}>
147149
{name}
148150
</Text>
149151
</LinearGradient>

0 commit comments

Comments
 (0)