@upstep/react-native 0.6.10 → 0.6.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upstep/react-native",
3
- "version": "0.6.10",
3
+ "version": "0.6.11",
4
4
  "description": "Upstep feedback SDK for React Native",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -12,7 +12,7 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "@upstep/types": "0.5.1"
15
+ "@upstep/types": "0.5.3"
16
16
  },
17
17
  "peerDependencies": {
18
18
  "react": ">=18",
@@ -66,7 +66,6 @@ export function FeedbackSheet() {
66
66
  const p = isDark ? DARK : LIGHT;
67
67
 
68
68
  const [nav, setNav] = useState<Nav>({ screen: "list" });
69
- const [listTab, setListTab] = useState<"open" | "done">("open");
70
69
  const insets = useSafeAreaInsets();
71
70
 
72
71
  // Refresh list every time the modal opens
@@ -136,30 +135,6 @@ export function FeedbackSheet() {
136
135
  )}
137
136
  </View>
138
137
 
139
- {/* Open / Completed tabs — only on list screen */}
140
- {nav.screen === "list" && (
141
- <View style={[styles.listTabBar, { borderBottomColor: p.border }]}>
142
- <TouchableOpacity
143
- onPress={() => setListTab("open")}
144
- style={[styles.listTabBtn, listTab === "open" && { borderBottomColor: accentColor }]}
145
- activeOpacity={0.7}
146
- >
147
- <Text style={[styles.listTabText, { color: listTab === "open" ? accentColor : p.textFaint }]}>
148
- Open
149
- </Text>
150
- </TouchableOpacity>
151
- <TouchableOpacity
152
- onPress={() => setListTab("done")}
153
- style={[styles.listTabBtn, listTab === "done" && { borderBottomColor: accentColor }]}
154
- activeOpacity={0.7}
155
- >
156
- <Text style={[styles.listTabText, { color: listTab === "done" ? accentColor : p.textFaint }]}>
157
- Completed
158
- </Text>
159
- </TouchableOpacity>
160
- </View>
161
- )}
162
-
163
138
  {/* Scrollable body */}
164
139
  <ScrollView
165
140
  style={styles.scroll}
@@ -171,7 +146,6 @@ export function FeedbackSheet() {
171
146
  <FeedListBody
172
147
  p={p}
173
148
  accent={accentColor}
174
- tab={listTab}
175
149
  onSelect={(id) => setNav({ screen: "detail", feedbackId: id })}
176
150
  />
177
151
  )}
@@ -217,15 +191,13 @@ export function FeedbackSheet() {
217
191
  // ─── FeedListBody ─────────────────────────────────────────────────────────────
218
192
 
219
193
  function FeedListBody({
220
- p, accent, tab, onSelect,
194
+ p, accent, onSelect,
221
195
  }: {
222
- p: Palette; accent: string; tab: "open" | "done"; onSelect: (id: string) => void;
196
+ p: Palette; accent: string; onSelect: (id: string) => void;
223
197
  }) {
224
198
  const { feedItems, feedLoading, vote } = useUpstep();
225
199
 
226
- const displayItems = tab === "done"
227
- ? feedItems.filter((f) => f.status === "DONE")
228
- : feedItems.filter((f) => f.status === "OPEN" || f.status === "IN_PROGRESS" || f.status === "PENDING");
200
+ const displayItems = feedItems.filter((f) => f.status !== "CLOSED");
229
201
 
230
202
  if (feedLoading) {
231
203
  return (
@@ -239,9 +211,7 @@ function FeedListBody({
239
211
  return (
240
212
  <View style={styles.centered}>
241
213
  <Text style={[styles.emptyText, { color: p.textFaint }]}>
242
- {tab === "done"
243
- ? "No completed items yet."
244
- : "No open feedback yet. Be the first to add one."}
214
+ No open feedback yet. Be the first to add one.
245
215
  </Text>
246
216
  </View>
247
217
  );
@@ -640,23 +610,6 @@ const styles = StyleSheet.create({
640
610
  newBtn: { borderRadius: 20, paddingHorizontal: 14, paddingVertical: 7 },
641
611
  newBtnText: { color: "#fff", fontSize: 13, fontWeight: "700" },
642
612
 
643
- // List tab bar
644
- listTabBar: {
645
- flexDirection: "row",
646
- borderBottomWidth: StyleSheet.hairlineWidth,
647
- },
648
- listTabBtn: {
649
- flex: 1,
650
- alignItems: "center",
651
- paddingVertical: 11,
652
- borderBottomWidth: 2,
653
- borderBottomColor: "transparent",
654
- },
655
- listTabText: {
656
- fontSize: 13,
657
- fontWeight: "600",
658
- },
659
-
660
613
  // Scroll — flex: 1 fills all remaining space after the fixed header
661
614
  scroll: { flex: 1 },
662
615
  scrollContent: { flexGrow: 1, padding: 16, paddingBottom: 32 },
package/src/api.ts CHANGED
@@ -13,7 +13,7 @@ export class UpstepApiClient {
13
13
  userId: string | undefined;
14
14
 
15
15
  constructor(config: UpstepConfig) {
16
- this.baseUrl = (config.baseUrl ?? "https://upstep.io").replace(/\/$/, "");
16
+ this.baseUrl = (config.baseUrl ?? "https://upstep.dev").replace(/\/$/, "");
17
17
  this.apiKey = config.apiKey;
18
18
  if (config.userId !== undefined) this.userId = config.userId;
19
19
  }