Skip to content

Commit 224f516

Browse files
authored
v0.0.15 (#41)
* v0.0.15 ~ added category pills to storefront catalog screens * fix event buffer hook and vehicle marker now calculates speed for marker movement duration * Component bug fixes and improvements, receipt screen, socket patches * several patches for vehicle live tracking and socket * fix receipt screen; * fixed critical bugs and made more responsive
1 parent 212d298 commit 224f516

34 files changed

+1819
-541
lines changed

App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { NotificationProvider } from './src/contexts/NotificationContext';
1616
import { getDefaultStyle as getDefaultToastStyle } from './src/utils/toast';
1717
import config from './tamagui.config';
1818

19-
const DEBUG_NAVIGATOR = false;
19+
const DEBUG_APP = false;
2020
function AppContent(): React.JSX.Element {
2121
const { appTheme } = useThemeContext();
2222

@@ -82,7 +82,7 @@ function TestContent(): React.JSX.Element {
8282
}
8383

8484
function App(): React.JSX.Element {
85-
if (DEBUG_NAVIGATOR) {
85+
if (DEBUG_APP) {
8686
return (
8787
<PortalProvider>
8888
<ThemeProvider>
30.2 KB
Loading

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fleetbase/storefront-app",
3-
"version": "0.0.14",
3+
"version": "0.0.15",
44
"private": true,
55
"scripts": {
66
"android": "react-native run-android",
@@ -93,6 +93,7 @@
9393
"react-native-notifications": "^5.1.0",
9494
"react-native-otp-entry": "^1.7.3",
9595
"react-native-permissions": "^4.1.1",
96+
"react-native-qrcode-svg": "^6.3.20",
9697
"react-native-reanimated": "^3.16.1",
9798
"react-native-render-html": "^6.3.4",
9899
"react-native-safe-area-context": "^5.0.0",

src/components/Badge.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,26 @@ const Badge = ({ status, color, inverted = false, icon, iconPlacement = 'left',
9494
</YStack>
9595
) : null;
9696

97+
const hasChildren = children !== null && children !== undefined;
98+
9799
return (
98100
<XStack alignItems='center' borderRadius='$4' borderWidth={1} backgroundColor={bg} borderColor={border} px={px} py={py} space='$1' {...props}>
99101
{iconPlacement === 'left' && iconElement}
100-
{status && (
102+
103+
{hasChildren ? (
104+
typeof children === 'string' ? (
105+
<Text color={text} fontWeight='bold' fontSize={fontSize}>
106+
{children}
107+
</Text>
108+
) : (
109+
children
110+
)
111+
) : status ? (
101112
<Text color={text} fontWeight='bold' fontSize={fontSize}>
102113
{titleize(status)}
103114
</Text>
104-
)}
105-
{children}
115+
) : null}
116+
106117
{iconPlacement === 'right' && iconElement}
107118
</XStack>
108119
);

0 commit comments

Comments
 (0)