@@ -2,9 +2,10 @@ import dynamic from 'next/dynamic';
22import { type ComponentType , createElement } from 'react' ;
33import { View } from 'react-native' ;
44
5- import { A , H4 , P } from '~/common/styleguide' ;
6- import { type IconProps } from '~/components/Icons' ;
5+ import { A , H4 , HoverEffect , P } from '~/common/styleguide' ;
6+ import { type IconProps , RSS } from '~/components/Icons' ;
77import LoadingContent from '~/components/Library/LoadingContent' ;
8+ import Tooltip from '~/components/Tooltip' ;
89import { type LibraryType , type Query } from '~/types' ;
910import tw from '~/util/tailwind' ;
1011import urlWithQuery from '~/util/urlWithQuery' ;
@@ -19,9 +20,17 @@ type Props = {
1920 Icon ?: ComponentType < IconProps > ;
2021 count ?: number ;
2122 queryParams ?: Query ;
23+ rss ?: string ;
2224} ;
2325
24- export default function HomeSection ( { data, title, Icon, count = 8 , queryParams = { } } : Props ) {
26+ export default function HomeSection ( {
27+ data,
28+ title,
29+ Icon,
30+ rss,
31+ count = 8 ,
32+ queryParams = { } ,
33+ } : Props ) {
2534 const hashLink = title . replace ( / \s / g, '' ) . toLowerCase ( ) ;
2635
2736 return (
@@ -35,6 +44,18 @@ export default function HomeSection({ data, title, Icon, count = 8, queryParams
3544 hoverStyle = { tw `text-palette-gray4 dark:text-palette-gray5` } >
3645 { title }
3746 </ A >
47+ { rss && (
48+ < Tooltip
49+ trigger = {
50+ < HoverEffect style = { tw `ml-auto` } >
51+ < A href = { rss } target = "_blank" style = { tw `h-5.5` } >
52+ < RSS style = { tw `text-icon` } />
53+ </ A >
54+ </ HoverEffect >
55+ } >
56+ RSS feed
57+ </ Tooltip >
58+ ) }
3859 </ H4 >
3960 < View style = { tw `flex-1 flex-row flex-wrap pt-3` } > { renderLibs ( data , count ) } </ View >
4061 < P style = { tw `px-6 pb-6 pt-2 text-sm font-light text-secondary` } >
0 commit comments