File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -47,12 +47,34 @@ export function Meta(props: MetaProps) {
4747 return null ;
4848}
4949
50+ /**
51+ * Common meta tag presets for convenience.
52+ */
5053/**
5154 * Common meta tag presets for convenience.
5255 */
5356export const MetaPresets = {
57+ /**
58+ * Standard SEO description.
59+ * @param content - Page description (recommended: 50-160 chars)
60+ */
5461 description : ( content : string ) => < Meta name = "description" content = { content } /> ,
62+
63+ /**
64+ * Viewport configuration for responsive design.
65+ * @param content - default: "width=device-width, initial-scale=1"
66+ */
5567 viewport : ( content = "width=device-width, initial-scale=1" ) => < Meta name = "viewport" content = { content } /> ,
68+
69+ /**
70+ * Character encoding declaration.
71+ * @param charset - default: "UTF-8"
72+ */
5673 charset : ( charset = "UTF-8" ) => < Meta charset = { charset } /> ,
74+
75+ /**
76+ * Robots indexing directives.
77+ * @param content - e.g., "index, follow" or "noindex"
78+ */
5779 robots : ( content : string ) => < Meta name = "robots" content = { content } /> ,
5880} ;
Original file line number Diff line number Diff line change 11'use client' ;
2- import { useSyncExternalStore , useState } from 'react' ;
2+ import { useSyncExternalStore , useState , memo } from 'react' ;
33
44interface PreviewData {
55 title : string ;
@@ -71,7 +71,7 @@ export interface SocialPreviewProps {
7171 forceVisible ?: boolean ;
7272}
7373
74- export function SocialPreview ( { forceVisible } : SocialPreviewProps ) {
74+ export const SocialPreview = memo ( function SocialPreview ( { forceVisible } : SocialPreviewProps ) {
7575 // Safety guard: only run in development unless forced
7676 if ( process . env . NODE_ENV !== 'development' && ! forceVisible ) {
7777 return null ;
@@ -137,4 +137,4 @@ export function SocialPreview({ forceVisible }: SocialPreviewProps) {
137137 </ div >
138138 </ div >
139139 ) ;
140- }
140+ } ) ;
You can’t perform that action at this time.
0 commit comments