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:
@@ -16,9 +16,6 @@ import colors from "@/constants/colors";
|
||||
*/
|
||||
export function useColors() {
|
||||
const scheme = useColorScheme();
|
||||
const palette =
|
||||
scheme === "dark" && "dark" in colors
|
||||
? (colors as Record<string, typeof colors.light>).dark
|
||||
: colors.light;
|
||||
const palette = scheme === "dark" ? colors.dark : colors.light;
|
||||
return { ...palette, radius: colors.radius };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user