@hoddy-ui/core 2.5.31 → 2.5.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/next/dist/index.d.mts +1 -0
- package/next/dist/index.d.ts +1 -0
- package/next/dist/index.js +78 -46
- package/next/dist/index.js.map +1 -1
- package/next/dist/index.mjs +98 -66
- package/next/dist/index.mjs.map +1 -1
- package/next/package.json +1 -1
- package/package.json +1 -1
- package/src/Components/Avatar.tsx +9 -3
- package/src/Components/Locator.tsx +2 -1
- package/src/theme/index.tsx +13 -5
package/next/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AntDesign } from "@expo/vector-icons";
|
|
2
|
-
import React from "react";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
3
|
import { Image, View } from "react-native";
|
|
4
4
|
import { ms, ScaledSheet } from "react-native-size-matters";
|
|
5
5
|
import { useColors } from "../hooks";
|
|
@@ -15,6 +15,7 @@ const Avatar: React.FC<AvatarProps> = ({
|
|
|
15
15
|
style = {},
|
|
16
16
|
}) => {
|
|
17
17
|
const colors = useColors();
|
|
18
|
+
const [imageError, setImageError] = useState(false);
|
|
18
19
|
const styles: any = ScaledSheet.create({
|
|
19
20
|
root: {
|
|
20
21
|
borderRadius: 150,
|
|
@@ -41,8 +42,13 @@ const Avatar: React.FC<AvatarProps> = ({
|
|
|
41
42
|
|
|
42
43
|
return (
|
|
43
44
|
<View style={styles.root}>
|
|
44
|
-
{source ? (
|
|
45
|
-
<Image
|
|
45
|
+
{source && !imageError ? (
|
|
46
|
+
<Image
|
|
47
|
+
resizeMode="cover"
|
|
48
|
+
style={styles.image}
|
|
49
|
+
source={source}
|
|
50
|
+
onError={() => setImageError(true)}
|
|
51
|
+
/>
|
|
46
52
|
) : label ? (
|
|
47
53
|
<Typography style={{ color: colors[color].text }}>
|
|
48
54
|
{label[0]}
|
|
@@ -57,10 +57,11 @@ export const getPredictionsFromQuery = async (
|
|
|
57
57
|
|
|
58
58
|
const p = [];
|
|
59
59
|
for (let key in res.predictions) {
|
|
60
|
-
const { description, place_id } = res.predictions[key];
|
|
60
|
+
const { description, place_id, types } = res.predictions[key];
|
|
61
61
|
p.push({
|
|
62
62
|
description,
|
|
63
63
|
id: place_id,
|
|
64
|
+
types,
|
|
64
65
|
});
|
|
65
66
|
}
|
|
66
67
|
return p;
|
package/src/theme/index.tsx
CHANGED
|
@@ -45,12 +45,20 @@ const ConfigureSystemUI = () => {
|
|
|
45
45
|
const config = getConfig();
|
|
46
46
|
if (colors) {
|
|
47
47
|
SystemUI.setBackgroundColorAsync(colors.white[1]);
|
|
48
|
-
if (Platform.OS === "android"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
if (Platform.OS === "android") {
|
|
49
|
+
if (config.EDGE_TO_EDGE) {
|
|
50
|
+
if (theme === "dark") {
|
|
51
|
+
NavigationBar.setStyle("light");
|
|
52
|
+
} else {
|
|
53
|
+
NavigationBar.setStyle("dark");
|
|
54
|
+
}
|
|
52
55
|
} else {
|
|
53
|
-
NavigationBar.
|
|
56
|
+
NavigationBar.setBackgroundColorAsync(colors.white[1]);
|
|
57
|
+
if (theme === "dark") {
|
|
58
|
+
NavigationBar.setButtonStyleAsync("light");
|
|
59
|
+
} else {
|
|
60
|
+
NavigationBar.setButtonStyleAsync("dark");
|
|
61
|
+
}
|
|
54
62
|
}
|
|
55
63
|
}
|
|
56
64
|
}
|