diff --git a/package-lock.json b/package-lock.json index 65702c9..98886f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -52,6 +52,7 @@ "react-native-emojicon": "^1.0.0", "react-native-gesture-handler": "~2.12.0", "react-native-htmlview": "^0.16.0", + "react-native-hyperlink": "^0.0.22", "react-native-ionicons": "^4.6.5", "react-native-modal-datetime-picker": "^17.1.0", "react-native-neat-date-picker": "^1.4.12", @@ -14408,6 +14409,14 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, + "node_modules/linkify-it": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz", + "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==", + "dependencies": { + "uc.micro": "^1.0.1" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -14763,6 +14772,11 @@ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==" + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -17411,6 +17425,19 @@ "htmlparser2-without-node-native": "^3.9.2" } }, + "node_modules/react-native-hyperlink": { + "version": "0.0.22", + "resolved": "https://registry.npmjs.org/react-native-hyperlink/-/react-native-hyperlink-0.0.22.tgz", + "integrity": "sha512-IVhG+aP2bAnllUEr08/+rGA3cbpzyl83PtOfe94higfWUR8E7rUGThj21tdhx8SWAyl+4XO1K864tA6ybVbMFA==", + "dependencies": { + "linkify-it": "^4.0.1", + "mdurl": "^1.0.1" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, "node_modules/react-native-ionicons": { "version": "4.6.5", "resolved": "https://registry.npmjs.org/react-native-ionicons/-/react-native-ionicons-4.6.5.tgz", @@ -19832,6 +19859,11 @@ "node": "*" } }, + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" + }, "node_modules/uglify-es": { "version": "3.3.9", "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", diff --git a/package.json b/package.json index bea0a19..4c73595 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "react-native-emojicon": "^1.0.0", "react-native-gesture-handler": "~2.12.0", "react-native-htmlview": "^0.16.0", + "react-native-hyperlink": "^0.0.22", "react-native-ionicons": "^4.6.5", "react-native-modal-datetime-picker": "^17.1.0", "react-native-neat-date-picker": "^1.4.12", diff --git a/src/app/(tabs)/home/index.tsx b/src/app/(tabs)/home/index.tsx index 2c8c0e3..62a11c9 100644 --- a/src/app/(tabs)/home/index.tsx +++ b/src/app/(tabs)/home/index.tsx @@ -3,6 +3,7 @@ import { router } from 'expo-router'; import { useEffect, useState } from 'react'; import { ActivityIndicator, ScrollView, Text, View } from 'react-native'; import { SafeAreaView } from 'react-native-safe-area-context'; +import Hyperlink from 'react-native-hyperlink'; import styles from './styles'; import ContentCard from '../../../components/ContentCard/ContentCard'; @@ -162,9 +163,19 @@ function HomeScreen() { {featuredStoriesHeader != '' && featuredStoriesDescription != null && featuredStoriesDescription != '' && ( - - {featuredStoriesDescription} - + + + {featuredStoriesDescription} + + )} {featuredStories.map(story => ( diff --git a/src/app/(tabs)/home/styles.ts b/src/app/(tabs)/home/styles.ts index 2b2627e..9b8a829 100644 --- a/src/app/(tabs)/home/styles.ts +++ b/src/app/(tabs)/home/styles.ts @@ -41,6 +41,10 @@ const styles = StyleSheet.create({ marginBottom: 24, marginRight: 24, }, + featuredDescriptionLink: { + color: 'blue', + textDecorationLine: 'underline', + }, }); export default styles;