- Created new Expo app with SDK 54+ and Expo Router - Installed and configured NativeWind v5 for Tailwind styling - Upgraded voice-assistant to React 19 for consistency - Kept voice-mobile outside workspace to avoid Metro bundler conflicts - Disabled React Compiler experimental feature for stability Setup includes: - postcss.config.mjs with Tailwind PostCSS plugin - global.css with Tailwind and NativeWind imports - metro.config.js with NativeWind wrapper - lightningcss pinned to 1.30.1 for stability Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
26 lines
794 B
TypeScript
26 lines
794 B
TypeScript
import { Href, Link } from 'expo-router';
|
|
import { openBrowserAsync, WebBrowserPresentationStyle } from 'expo-web-browser';
|
|
import { type ComponentProps } from 'react';
|
|
|
|
type Props = Omit<ComponentProps<typeof Link>, 'href'> & { href: Href & string };
|
|
|
|
export function ExternalLink({ href, ...rest }: Props) {
|
|
return (
|
|
<Link
|
|
target="_blank"
|
|
{...rest}
|
|
href={href}
|
|
onPress={async (event) => {
|
|
if (process.env.EXPO_OS !== 'web') {
|
|
// Prevent the default behavior of linking to the default browser on native.
|
|
event.preventDefault();
|
|
// Open the link in an in-app browser.
|
|
await openBrowserAsync(href, {
|
|
presentationStyle: WebBrowserPresentationStyle.AUTOMATIC,
|
|
});
|
|
}
|
|
}}
|
|
/>
|
|
);
|
|
}
|