Skip to content

Commit

Permalink
feat(188): fix del error por mostrar videos (#189)
Browse files Browse the repository at this point in the history
## Que hace esta Pull Request?
- Resuelve un error al visualizar noticias con videos

## Por qué se hace esta implementación?
- Porque fallaba al visualizar noticias 

## A quién/qué puede impactar?
- A usuarios que consuman noticias

## Cómo probaste esta implementación?
- Con un Iphone12Pro
  • Loading branch information
benvalencia authored Nov 28, 2024
2 parents 70d74c2 + ac0710e commit a42fb10
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
13 changes: 7 additions & 6 deletions app/screens/news/newsDetail.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import {ScrollView, Text, useWindowDimensions, View} from 'react-native';
import {useTheme} from "@react-navigation/native";
import React from "react";
import {useSafeAreaInsets} from "react-native-safe-area-context";
import {ScrollView, Text, useWindowDimensions, View} from 'react-native';
import RenderHTML from "react-native-render-html";
import {useTheme} from "@react-navigation/native";
import {useSafeAreaInsets} from "react-native-safe-area-context";

import {Img} from "@/components/elements/Img";
import {Fonts} from "@/constants/Colors";
// import { WebView } from 'react-native-webview';
Expand Down Expand Up @@ -32,8 +33,8 @@ export default function NewsDetailScreen({route}: any) {
li: {
color: colors.text,
}
};

};
return (
<View style={{paddingBottom: bottom + 165}}>
<Img
Expand Down Expand Up @@ -74,7 +75,7 @@ export default function NewsDetailScreen({route}: any) {
? <RenderHTML
contentWidth={width}
source={{html: newsDetail.content}}
ignoredDomTags={['iframe']}
ignoredDomTags={['iframe', 'video']}
emSize={2}
tagsStyles={tagsStyles}
/>
Expand Down
8 changes: 4 additions & 4 deletions app/screens/profile/stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export default function StatsScreen({route}: any) {
{rankedInfo !== null ?
<View style={{flexDirection: 'column', gap: 10, justifyContent: 'space-around', flexWrap: 'wrap'}}>
<View style={{flexDirection: 'row', justifyContent: 'space-around'}}>
{rankedInfo.ranked.stats.rank !== null
{rankedInfo.ranked.stats && rankedInfo.ranked.stats.rank !== undefined
? <View style={{
padding: 5,
alignItems: 'center',
Expand All @@ -375,7 +375,7 @@ export default function StatsScreen({route}: any) {
</View>
: null}

{rankedInfo.ranked.zeroBuild.rank !== null
{rankedInfo.ranked.zeroBuild && rankedInfo.ranked.zeroBuild.rank !== undefined
? <View style={{
padding: 5,
alignItems: 'center',
Expand All @@ -394,7 +394,7 @@ export default function StatsScreen({route}: any) {
: null}
</View>
<View style={{flexDirection: 'row', justifyContent: 'space-around'}}>
{rankedInfo.ranked.stats.rank !== null
{rankedInfo.ranked.reloadRanked && rankedInfo.ranked.reloadRanked.rank !== undefined
? <View style={{
padding: 5,
alignItems: 'center',
Expand All @@ -411,7 +411,7 @@ export default function StatsScreen({route}: any) {
}}/>
</View>
: null}
{rankedInfo.ranked.stats.rank !== null
{rankedInfo.ranked.racing && rankedInfo.ranked.racing.rank !== undefined
? <View style={{
padding: 5,
alignItems: 'center',
Expand Down

0 comments on commit a42fb10

Please sign in to comment.