Skip to content

Commit fd8982b

Browse files
authored
Merge pull request #111 from gluestack/fix/template-typing
fix: broken imports and ts-errors
2 parents e524d78 + 205f82e commit fd8982b

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

apps/templates/expo-router-with-nativewind/components/ExternalLink.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ import * as WebBrowser from "expo-web-browser";
33
import React from "react";
44
import { Platform } from "react-native";
55

6-
export function ExternalLink(
7-
props: Omit<React.ComponentProps<typeof Link>, "href"> & { href: string }
8-
) {
6+
export function ExternalLink({
7+
href,
8+
...props
9+
}: React.ComponentProps<typeof Link>) {
910
return (
1011
<Link
1112
target="_blank"
1213
{...props}
13-
// @ts-expect-error: External URLs are not typed.
14-
href={props.href}
14+
href={href}
1515
onPress={(e) => {
1616
if (Platform.OS !== "web") {
1717
// Prevent the default behavior of linking to the default browser on native.
1818
e.preventDefault();
1919
// Open the link in an in-app browser.
20-
WebBrowser.openBrowserAsync(props.href as string);
20+
WebBrowser.openBrowserAsync(href as string);
2121
}
2222
}}
2323
/>

apps/templates/expo-router-with-nativewind/components/Themed.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { Text as DefaultText, View as DefaultView } from 'react-native';
77

8-
import Colors from '@/constants/Colors';
8+
import { Colors } from '@/constants/Colors';
99
import { useColorScheme } from './useColorScheme';
1010

1111
type ThemeProps = {

apps/templates/expo-router-with-nativewind/components/ui/grid/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { cssInterop } from 'nativewind';
1313
import {
1414
useBreakpointValue,
1515
getBreakPointValue,
16-
} from '../../hooks/use-break-point-value';
16+
} from '../utils/use-break-point-value';
1717

1818
const { width: DEVICE_WIDTH } = Dimensions.get('window');
1919

apps/templates/expo-router-with-nativewind/components/ui/utils/use-break-point-value.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Dimensions, useWindowDimensions } from 'react-native';
22
import { useEffect, useState } from 'react';
33

44
import resolveConfig from 'tailwindcss/resolveConfig';
5-
import tailwindConfig from 'tailwind.config';
5+
import * as tailwindConfig from 'tailwind.config';
66

77
const TailwindTheme = resolveConfig(tailwindConfig as any);
88
const screenSize = TailwindTheme.theme.screens;

apps/templates/next-app-router-with-nativewind/components/ui/grid/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { cssInterop } from 'nativewind';
1313
import {
1414
useBreakpointValue,
1515
getBreakPointValue,
16-
} from '../../hooks/use-break-point-value';
16+
} from '../utils/use-break-point-value';
1717

1818
const { width: DEVICE_WIDTH } = Dimensions.get('window');
1919

apps/templates/next-app-router-with-nativewind/components/ui/utils/use-break-point-value.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Dimensions, useWindowDimensions } from 'react-native';
22
import { useEffect, useState } from 'react';
33

44
import resolveConfig from 'tailwindcss/resolveConfig';
5-
import tailwindConfig from 'tailwind.config';
5+
import * as tailwindConfig from 'tailwind.config';
66

77
const TailwindTheme = resolveConfig(tailwindConfig as any);
88
const screenSize = TailwindTheme.theme.screens;

0 commit comments

Comments
 (0)