File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,13 +20,20 @@ const loading = ref(false);
2020const showRolesModal = ref (false );
2121const data = ref <ProfileViewDetailed >();
2222const labels = ref <Array <BlueskyLabel >>([]);
23+ const postsError = ref <string >(" " );
24+
2325const loadProfile = async () => {
26+ postsError .value = " " ;
2427 const labelsQuery = useBlueskyLabels (props .did );
2528 data .value = await getProfile (props .did );
2629
27- posts .value = await newAgent ()
28- .getAuthorFeed ({ actor: props .did })
29- .then ((r ) => r .data .feed );
30+ try {
31+ posts .value = await newAgent ()
32+ .getAuthorFeed ({ actor: props .did })
33+ .then ((r ) => r .data .feed );
34+ } catch (error ) {
35+ postsError .value = String (error );
36+ }
3037 labels .value = await labelsQuery ;
3138};
3239
@@ -196,12 +203,20 @@ await loadProfile();
196203 </shared-card >
197204 </div >
198205 <div class =" mb-3 md:w-[50%]" >
206+ <shared-card v-if =" postsError" variant =" error" >
207+ Cannot show posts:
208+ {{ postsError.replace(/^Error:/i, "").replace(`: ${did}`, "") }}
209+ </shared-card >
199210 <shared-card
200- v-if =" actor"
211+ v-else- if =" actor"
201212 :class =" { 'loading-flash': loading }"
202213 no-padding
203214 >
204- <user-recent-posts :actor-did =" actor.did" :posts =" posts" />
215+ <user-recent-posts
216+ v-if =" posts"
217+ :actor-did =" actor.did"
218+ :posts =" posts"
219+ />
205220 </shared-card >
206221 </div >
207222 </div >
You can’t perform that action at this time.
0 commit comments