fix: resolve TypeScript errors caught by typecheck
- _layout: replace invalid SFSymbols7_0 name "calendar.fill" with "calendar.circle.fill" (the fill variant of calendar in SF Symbols) - useColors: remove unsafe cast through Record<string, palette> — colors.radius (number) is incompatible with the palette shape; simplify to a direct ternary since both light and dark palettes are always defined Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@ function NativeTabLayout() {
|
|||||||
return (
|
return (
|
||||||
<NativeTabs>
|
<NativeTabs>
|
||||||
<NativeTabs.Trigger name="index">
|
<NativeTabs.Trigger name="index">
|
||||||
<Icon sf={{ default: "calendar", selected: "calendar.fill" }} />
|
<Icon sf={{ default: "calendar", selected: "calendar.circle.fill" }} />
|
||||||
<Label>Calendar</Label>
|
<Label>Calendar</Label>
|
||||||
</NativeTabs.Trigger>
|
</NativeTabs.Trigger>
|
||||||
<NativeTabs.Trigger name="posts">
|
<NativeTabs.Trigger name="posts">
|
||||||
|
|||||||
@@ -16,9 +16,6 @@ import colors from "@/constants/colors";
|
|||||||
*/
|
*/
|
||||||
export function useColors() {
|
export function useColors() {
|
||||||
const scheme = useColorScheme();
|
const scheme = useColorScheme();
|
||||||
const palette =
|
const palette = scheme === "dark" ? colors.dark : colors.light;
|
||||||
scheme === "dark" && "dark" in colors
|
|
||||||
? (colors as Record<string, typeof colors.light>).dark
|
|
||||||
: colors.light;
|
|
||||||
return { ...palette, radius: colors.radius };
|
return { ...palette, radius: colors.radius };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user