File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,17 @@ interface FeatureCardProps {
1010 link ?: string ;
1111}
1212
13+ const DEFAULT_DOCS_URL = 'https://opsimate.vercel.app/docs/' ;
14+
1315const FeatureCard : React . FC < FeatureCardProps > = ( {
1416 icon : Icon ,
1517 title,
1618 description,
1719 className = '' ,
1820 link,
1921} ) => {
22+ const resolvedLink = link ?? DEFAULT_DOCS_URL ;
23+
2024 return (
2125 < div className = { `feature-card group hover:scale-105 transition-all duration-300 ${ className } ` } >
2226 < div className = "flex items-center mb-3" >
@@ -27,19 +31,17 @@ const FeatureCard: React.FC<FeatureCardProps> = ({
2731 < h3 className = "text-lg font-semibold text-surface-900 dark:text-surface-100 mb-2" > { title } </ h3 >
2832 < p className = "text-sm text-surface-600 dark:text-surface-400 leading-relaxed" > { description } </ p >
2933
30- { (
31- link ?? 'https://opsimate.vercel.app/docs/'
32- ) && (
34+ { resolvedLink && (
3335 < Link
34- href = { link ?? 'https://opsimate.vercel.app/docs/' }
36+ href = { resolvedLink }
3537 className = "mt-3 inline-flex items-center gap-1 text-blue-600 hover:text-blue-700 text-sm font-medium transition-colors duration-200"
36- { ...( link ? .startsWith ( 'https' ) && {
38+ { ...( resolvedLink . startsWith ( 'https' ) && {
3739 target : "_blank" ,
3840 rel : "noopener noreferrer"
3941 } ) }
4042 >
4143 Learn more
42- < ExternalLink className = "h-3 w-3" />
44+ { resolvedLink . startsWith ( 'https' ) && < ExternalLink className = "h-3 w-3" /> }
4345 </ Link >
4446 ) }
4547 </ div >
You can’t perform that action at this time.
0 commit comments