react-native-in-app-debugger 1.0.19 → 1.0.21

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/Api.jsx CHANGED
@@ -157,7 +157,7 @@ export default (props) => {
157
157
  </View>
158
158
  {!filter &&
159
159
  !!props.maxNumOfApiToStore &&
160
- apis.length === props.maxNumOfApiToStore && (
160
+ apis.length >= props.maxNumOfApiToStore && (
161
161
  <Text style={{ color: "#ffffff88", padding: 10 }}>
162
162
  Capped to only latest {props.maxNumOfApiToStore} APIs
163
163
  </Text>
package/index.jsx CHANGED
@@ -8,9 +8,6 @@ import {
8
8
  SafeAreaView,
9
9
  Dimensions,
10
10
  } from "react-native";
11
- // const DeviceInfo = React.lazy(() =>
12
- // import("react-native-device-info").catch(() => ({ default: null }))
13
- // );
14
11
 
15
12
  let DeviceInfo;
16
13
  try {
@@ -179,7 +176,7 @@ const styles = StyleSheet.create({
179
176
  badgeContainer: {
180
177
  gap: 3,
181
178
  flexDirection: "row",
182
- top: -12,
179
+ top: -10,
183
180
  right: -3,
184
181
  position: "absolute",
185
182
  zIndex: 999,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-in-app-debugger",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "",
5
5
  "main": "index.jsx",
6
6
  "scripts": {
@@ -18,6 +18,7 @@ const parse = (data) => {
18
18
  };
19
19
 
20
20
  export default (maxNumOfApiToStore) => {
21
+ console.log("xxxxx maxNumOfApiToStore", maxNumOfApiToStore);
21
22
  const [apis, setApis] = useState([]);
22
23
 
23
24
  const makeRequest = (data) => {
@@ -40,9 +41,8 @@ export default (maxNumOfApiToStore) => {
40
41
  setApis((v) => {
41
42
  const newData = [
42
43
  { request, id: Date.now().toString(36) + Math.random().toString(36) },
43
- ...v,
44
+ ...(maxNumOfApiToStore ? v.slice(0, maxNumOfApiToStore - 1) : v),
44
45
  ];
45
- if (maxNumOfApiToStore) newData.slice(0, maxNumOfApiToStore);
46
46
  return newData;
47
47
  });
48
48
  };