Skip to content

Commit 9cbd6af

Browse files
committed
suggestor v2
1 parent 51d4950 commit 9cbd6af

File tree

3 files changed

+124
-261
lines changed

3 files changed

+124
-261
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ Create a `.env.development` file with these contents:
1212

1313
```bash
1414
GATSBY_API_URL=http://localhost:4000 # or whatever port you are running the API on
15+
GATSBY_ENV=dev
1516
```

src/components/bsky.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ import React, { ReactElement } from "react"
22
import { ProfileViewDetailed } from "@atproto/api/dist/client/types/app/bsky/actor/defs"
33

44
interface IExpandedProfileDetails {
5-
myFollowersCount: number
6-
folledByMe: boolean
7-
score: number
85
profile: ProfileViewDetailed
6+
score?: number
7+
myFollowers?: number
98
}
109

1110
const getProfileList = (
@@ -14,31 +13,31 @@ const getProfileList = (
1413
) => {
1514
return (
1615
<ul className="flex flex-column profile-view">
17-
{profileDetails.map((suggestion, index) => (
16+
{profileDetails.map((details, index) => (
1817
<li key={index} className="flex flex-column">
1918
<div className="flex flex-row align-items-center">
2019
<img
21-
src={suggestion.profile.avatar}
22-
alt={suggestion.profile.displayName}
20+
src={details.profile.avatar}
21+
alt={details.profile.displayName}
2322
className="img-thumbnail"
2423
width={40}
2524
height={40}
2625
/>
2726
<div>
28-
<p>{suggestion.profile.displayName}</p>
29-
<a href={`https://bsky.app/profile/${suggestion.profile.handle}`}>
30-
<p>@{suggestion.profile.handle}</p>
27+
<p>{details.profile.displayName}</p>
28+
<a href={`https://bsky.app/profile/${details.profile.handle}`}>
29+
<p>@{details.profile.handle}</p>
3130
</a>
3231
</div>
3332
</div>
3433
{extra ? (
3534
<>
3635
<hr />
37-
{extra(null)}
36+
{extra(details)}
3837
</>
3938
) : null}
4039
<hr />
41-
{suggestion.profile.description?.split("\n").map((line, idx) => (
40+
{details.profile.description?.split("\n").map((line, idx) => (
4241
<p className="profile-description" key={idx}>
4342
{line}
4443
</p>

0 commit comments

Comments
 (0)