@@ -49,7 +49,12 @@ export const FeatureCard = ({
4949 const colors = categoryColors [ category ] ;
5050
5151 // Generate ID from title if not explicitly provided
52- const generatedId = id || title . toLowerCase ( ) . replace ( / \s + / g, '-' ) . replace ( / [ ^ \w - ] / g, '' ) ;
52+ const generatedId =
53+ id ||
54+ title
55+ . toLowerCase ( )
56+ . replace ( / \s + / g, "-" )
57+ . replace ( / [ ^ \w - ] / g, "" ) ;
5358
5459 const cardContent = (
5560 < div
@@ -89,11 +94,7 @@ export const FeatureCard = ({
8994 < span className = "font-semibold text-primary" > { comparison . after } </ span >
9095 </ div >
9196 ) }
92- { link && (
93- < div className = "mt-3 text-sm font-medium text-primary hover:underline" >
94- Learn more →
95- </ div >
96- ) }
97+ { link && < div className = "mt-3 text-sm font-medium text-primary hover:underline" > Learn more →</ div > }
9798 </ div >
9899 ) ;
99100
@@ -122,10 +123,18 @@ export interface HighlightCardProps {
122123
123124export const HighlightCard = ( { id, title, description, stats, link, category = "protection" } : HighlightCardProps ) : React . JSX . Element => {
124125 // Generate ID from title if not explicitly provided
125- const generatedId = id || title . toLowerCase ( ) . replace ( / \s + / g, '-' ) . replace ( / [ ^ \w - ] / g, '' ) ;
126+ const generatedId =
127+ id ||
128+ title
129+ . toLowerCase ( )
130+ . replace ( / \s + / g, "-" )
131+ . replace ( / [ ^ \w - ] / g, "" ) ;
126132
127133 const content = (
128- < div id = { generatedId } className = "border border-solid border-primary/30 rounded-lg p-6 bg-gradient-to-r from-primary/5 to-transparent hover:shadow-md transition-all" >
134+ < div
135+ id = { generatedId }
136+ className = "border border-solid border-primary/30 rounded-lg p-6 bg-gradient-to-r from-primary/5 to-transparent hover:shadow-md transition-all"
137+ >
129138 < h4 className = "font-semibold text-lg mb-2 text-gray-900 dark:text-gray-900" > { title } </ h4 >
130139 < p className = "text-sm text-gray-600 dark:text-gray-700 mb-4 leading-relaxed" > { description } </ p >
131140 { stats && stats . length > 0 && (
@@ -138,11 +147,7 @@ export const HighlightCard = ({ id, title, description, stats, link, category =
138147 ) ) }
139148 </ div >
140149 ) }
141- { link && (
142- < div className = "mt-4 text-sm font-medium text-primary hover:underline" >
143- Learn more →
144- </ div >
145- ) }
150+ { link && < div className = "mt-4 text-sm font-medium text-primary hover:underline" > Learn more →</ div > }
146151 </ div >
147152 ) ;
148153
0 commit comments