Redirect youtube videos to youtuube

This commit is contained in:
Kamran Ahmed
2021-10-01 10:59:46 +02:00
parent f523b077a4
commit a2db93873b
4 changed files with 10 additions and 5 deletions

View File

@ -6,15 +6,17 @@ type LinksListItemProps = {
title: string;
subtitle: string;
badgeText?: string;
target?: string;
icon?: React.ReactChild;
hideSubtitleOnMobile?: boolean;
};
export function LinksListItem(props: LinksListItemProps) {
const { title, subtitle, badgeText, icon, hideSubtitleOnMobile = false, href } = props;
const { title, subtitle, badgeText, icon, hideSubtitleOnMobile = false, href, target } = props;
return (
<Link
target={target || '_self'}
href={href}
fontSize={['14px', '14px', '15px']}
py='9px'

View File

@ -5,6 +5,7 @@ type VideoGridItemProps = {
title: string;
subtitle: string;
date: string;
target?: string;
isNew?: boolean;
isPro?: boolean;
colorIndex?: number;
@ -53,10 +54,10 @@ const bgColorList = [
];
export function VideoGridItem(props: VideoGridItemProps) {
const { title, subtitle, date, isNew = false, isPro = false, colorIndex = 0, href } = props;
const { title, subtitle, date, isNew = false, isPro = false, colorIndex = 0, href, target } = props;
return (
<Box _hover={{ textDecoration: 'none', transform: 'scale(1.02)' }} as={Link} href={ href } shadow='xl' p='20px'
<Box _hover={{ textDecoration: 'none', transform: 'scale(1.02)' }} as={Link} href={ href } target={target || '_self'} shadow='xl' p='20px'
rounded='10px' bg={bgColorList[colorIndex] ?? bgColorList[0]} flex={1}>
<Text mb='7px' fontSize='12px' color='gray.400'>
{isNew && <Badge colorScheme={'yellow'} mr='10px'>New</Badge>}