- Error boundary with Macedonian fallback screen and retry button wrapping all navigation - Pull-to-refresh on all list/detail screens (home, explore, posts, chat, profile, ad detail, post detail) - Accessibility: labels on all interactive elements, roles on Pressable/Button, selectable text for user data - Deep linking: mojmajstor:// scheme configured in app.json, ad/[id] and chat/[id] routes work via Expo Router auto-routing - Pagination: cursor-based paginated queries for ads, posts, messages, chats, reviews with Load More buttons on frontend - Profile: shows customer posts with PostCard, loading/error states, create-post navigation - Auth error messages in Macedonian (Невалидни акредитиви, итн.) All UI text in Macedonian. TypeScript clean, Convex functions deployed.
28 lines
861 B
TypeScript
28 lines
861 B
TypeScript
import { View, Text } from "react-native";
|
|
import { useTheme } from "../theme";
|
|
|
|
interface RatingProps {
|
|
value: number;
|
|
count?: number;
|
|
size?: number;
|
|
}
|
|
|
|
export function Rating({ value, count, size = 16 }: RatingProps) {
|
|
const theme = useTheme();
|
|
|
|
return (
|
|
<View
|
|
accessible
|
|
accessibilityLabel={`${value.toFixed(1)} ѕвезди${count !== undefined ? `, ${count} оцени` : ""}`}
|
|
style={{ flexDirection: "row", alignItems: "center", gap: 4 }}
|
|
>
|
|
<Text style={{ color: theme.colors.star, fontSize: size }}>★</Text>
|
|
<Text style={{ color: theme.colors.textSecondary, fontSize: 14, fontVariant: ["tabular-nums"] as any }}>
|
|
{value.toFixed(1)}
|
|
</Text>
|
|
{count !== undefined && (
|
|
<Text style={{ color: theme.colors.textTertiary, fontSize: 12 }}>({count})</Text>
|
|
)}
|
|
</View>
|
|
);
|
|
} |