Open History to see the last commit
1import IconGitBranch from "@tabler/icons-react-native/IconGitBranch";
2import IconGitMerge from "@tabler/icons-react-native/IconGitMerge";
3import IconGitCommit from "@tabler/icons-react-native/IconGitCommit";
4import IconGitPullRequestClosed from "@tabler/icons-react-native/IconGitPullRequestClosed";
5import IconGitPullRequestDraft from "@tabler/icons-react-native/IconGitPullRequestDraft";
6import type { SFSymbol } from "expo-symbols";
7import IconCircleDot from "@tabler/icons-react-native/IconCircleDot";
8import IconGitPullRequest from "@tabler/icons-react-native/IconGitPullRequest";
9import IconFileDiff from "@tabler/icons-react-native/IconFileDiff";
10import IconRobot from "@tabler/icons-react-native/IconRobot";
11import { SymbolView as ExpoSymbolView } from "expo-symbols";
12import { withUniwind } from "uniwind";
13import type { AppSymbolViewProps } from "./AppSymbol.android";
14
15export type { SFSymbol } from "expo-symbols";
16export type { AppSymbolName, AppSymbolViewProps } from "./AppSymbol.android";
17
18const CUSTOM_ICONS = {
19 "file.diff": IconFileDiff,
20 "arrow.triangle.pull": IconGitPullRequest,
21 "arrow.triangle.merge": IconGitMerge,
22 "arrow.triangle.branch": IconGitBranch,
23 "arrow.branch": IconGitBranch,
24 "git.pull-request.closed": IconGitPullRequestClosed,
25 "git.pull-request.draft": IconGitPullRequestDraft,
26 "git.commit": IconGitCommit,
27 "git.issue": IconCircleDot,
28 robot: IconRobot,
29};
30
31function AppSymbolView(props: AppSymbolViewProps) {
32 const name = typeof props.name === "string" ? props.name : props.name.ios;
33 const CustomIcon = CUSTOM_ICONS[name as keyof typeof CUSTOM_ICONS];
34 if (CustomIcon) {
35 return (
36 <CustomIcon
37 accessibilityLabel={props.accessibilityLabel}
38 color={props.tintColor}
39 size={props.size}
40 strokeWidth={2}
41 style={props.style}
42 testID={props.testID}
43 />
44 );
45 }
46
47 return <ExpoSymbolView {...props} name={name as SFSymbol} />;
48}
49
50export const SymbolView = withUniwind(AppSymbolView);