Skip to content

Commit ed2cf47

Browse files
authored
chore: add build workflow (#416)
1 parent 46912ab commit ed2cf47

File tree

2 files changed

+55
-11
lines changed

2 files changed

+55
-11
lines changed

.github/workflows/build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "Build All Packages"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "dev"
8+
- "main"
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 22.x
20+
21+
- name: Install build dependencies
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y build-essential python3
25+
26+
- name: Install pnpm
27+
run: npm install -g pnpm
28+
29+
- name: Install Dependencies
30+
run: pnpm install
31+
32+
- name: Clean and rebuild native modules
33+
run: |
34+
# Remove any pre-built binaries that might be incompatible
35+
find node_modules -name "*.node" -delete 2>/dev/null || true
36+
# Rebuild all native modules
37+
pnpm rebuild
38+
39+
- name: Build All Packages
40+
run: pnpm build
41+

platforms/blabsy/src/components/user/user-follow-stats.tsx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,20 @@ export function UserFollowStats({
4949
{[
5050
['Following', currentFollowing],
5151
['Follower', currentFollowers]
52-
].map(([title, stats], index) => (
53-
<div
54-
key={title}
55-
className='mt-0.5 mb-[3px] flex h-4 items-center gap-1 pointer-events-none'
56-
>
57-
<p className='font-bold text-light-primary dark:text-dark-primary'>
58-
{stats}
59-
</p>
60-
<p>{index === 1 && stats > 1 ? `${title}s` : title}</p>
61-
</div>
62-
))}
52+
].map(([title, stats], index) => {
53+
const statsValue = typeof stats === 'number' ? stats : 0;
54+
return (
55+
<div
56+
key={title}
57+
className='mt-0.5 mb-[3px] flex h-4 items-center gap-1 pointer-events-none'
58+
>
59+
<p className='font-bold text-light-primary dark:text-dark-primary'>
60+
{stats}
61+
</p>
62+
<p>{index === 1 && statsValue > 1 ? `${title}s` : title}</p>
63+
</div>
64+
);
65+
})}
6366
</div>
6467
);
6568
}

0 commit comments

Comments
 (0)