Skip to content

Commit

Permalink
fix: useTheme and renamed type
Browse files Browse the repository at this point in the history
  • Loading branch information
OtavioStasiak committed Oct 16, 2024
1 parent 1b2efea commit 300d9f2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/containers/message/Components/Attachments/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,14 @@ const styles = StyleSheet.create({
},
playerIcon: {
position: 'absolute',
shadowColor: themes.light.backdropColor,
shadowOpacity: 0.3,
shadowOffset: {
width: 1,
height: 1
}
}
});

type Image = string | null;
type TThumbnailImage = string | null;

type ThumbnailProps = {
url: string;
Expand All @@ -64,7 +62,7 @@ const Thumbnail = ({ url, status, encrypted = false }: ThumbnailProps) => {
icon = 'encrypted';
}

const [image, setImage] = useState<Image>(null);
const [image, setImage] = useState<TThumbnailImage>(null);

const generateThumbnail = async () => {
try {
Expand Down Expand Up @@ -94,7 +92,10 @@ const Thumbnail = ({ url, status, encrypted = false }: ThumbnailProps) => {
name={icon}
size={54}
color={themes[theme].fontPureWhite}
style={[styles.playerIcon, { shadowColor: themes[theme].backdropColor }]}
style={[
styles.playerIcon,
{ shadowColor: themes[theme].backdropColor, shadowOpacity: themes[theme].backdropOpacity }
]}
/>
</>
)}
Expand Down

0 comments on commit 300d9f2

Please sign in to comment.