1// Test the custom HTML component is rendered during SSR. 2 3import { usePathname } from 'expo-router'; 4import { ScrollViewStyleReset } from 'expo-router/html'; 5 6export default function Html({ children }) { 7 // Test that this is defined and works during SSR. 8 const pathname = usePathname(); 9 10 return ( 11 <html lang="en"> 12 <head> 13 <meta charSet="utf-8" /> 14 <meta httpEquiv="X-UA-Compatible" content="IE=edge" /> 15 <meta name="custom-value" content="value" /> 16 <meta name="expo-e2e-pathname" content={pathname} /> 17 {/* Test that public env vars are exposed */} 18 <meta name="expo-e2e-public-env-var" content={process.env.EXPO_PUBLIC_TEST_VALUE} /> 19 {/* Test that server-only env vars are exposed as this file is a server file. */} 20 <meta name="expo-e2e-private-env-var" content={process.env.EXPO_NOT_PUBLIC_TEST_VALUE} /> 21 <meta 22 name="viewport" 23 content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover" 24 /> 25 <ScrollViewStyleReset /> 26 </head> 27 <body>{children}</body> 28 </html> 29 ); 30} 31