Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Commit 0cc4d8d

Browse files
committed
feat: edit page
1 parent 9f6609a commit 0cc4d8d

14 files changed

Lines changed: 611 additions & 60 deletions

File tree

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@rainbow-me/rainbowkit": "^0.8.0",
2020
"@tanstack/react-query": "^4.19.1",
2121
"@tanstack/react-query-persist-client": "^4.19.1",
22+
"axios": "^1.2.1",
2223
"clsx": "^1.2.1",
2324
"crossbell.js": "^0.11.5",
2425
"dayjs": "^1.11.6",
@@ -33,6 +34,8 @@
3334
"nextjs-progressbar": "^0.0.16",
3435
"react": "18.2.0",
3536
"react-dom": "18.2.0",
37+
"react-hook-form": "^7.40.0",
38+
"react-hot-toast": "^2.4.0",
3639
"react-parallax-tilt": "^1.7.75",
3740
"refractor": "^4.8.0",
3841
"rehype-infer-description-meta": "^1.1.0",

pnpm-lock.yaml

Lines changed: 86 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/ConnectButton.tsx

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -157,44 +157,6 @@ export const ConnectButton: React.FC<{
157157
}-0 pt-2 group-hover:block top-full z-10 text-gray-600`}
158158
>
159159
<div className="bg-white rounded-lg ring-1 ring-zinc-100 min-w-[140px] shadow-md py-2 text-sm">
160-
<div className="px-4 py-2 h-auto flex items-center w-full whitespace-nowrap font-medium">
161-
Your characters
162-
</div>
163-
{characters.data?.list?.length ? (
164-
characters.data?.list?.map((character) => (
165-
<UniLink
166-
key={character.handle}
167-
href={`/${character.handle}`}
168-
className="px-4 py-2 h-auto flex items-center w-full whitespace-nowrap hover:bg-zinc-100"
169-
>
170-
<Avatar
171-
className="align-middle mr-2"
172-
images={
173-
character.metadata?.content?.avatars || []
174-
}
175-
name={character.metadata?.content?.name}
176-
size={30}
177-
/>
178-
<span className="flex-1 flex flex-col min-w-0">
179-
<span className="text-left leading-none font-medium truncate">
180-
{character.metadata?.content?.name}
181-
</span>
182-
<span className="text-left leading-none text-xs truncate">
183-
{"@" + character.handle}
184-
</span>
185-
</span>
186-
{character.primary && (
187-
<span className="font-medium text-xs text-yellow-300 ml-2">
188-
🌟 Primary
189-
</span>
190-
)}
191-
</UniLink>
192-
))
193-
) : (
194-
<span className="px-4 py-2 h-auto flex items-center w-full whitespace-nowrap text-zinc-400">
195-
Empty
196-
</span>
197-
)}
198160
{InsufficientBalance && (
199161
<UniLink
200162
href="https://faucet.crossbell.io/"
@@ -218,6 +180,47 @@ export const ConnectButton: React.FC<{
218180
</UniLink>
219181
)
220182
})}
183+
<hr className="mt-2 mb-1" />
184+
<div className="px-4 py-2 h-auto flex items-center w-full whitespace-nowrap font-medium">
185+
Your characters
186+
</div>
187+
<div className="h-96 overflow-scroll">
188+
{characters.data?.list?.length ? (
189+
characters.data?.list?.map((character) => (
190+
<UniLink
191+
key={character.handle}
192+
href={`/${character.handle}`}
193+
className="px-4 py-2 h-auto flex items-center w-full whitespace-nowrap hover:bg-zinc-100"
194+
>
195+
<Avatar
196+
className="align-middle mr-2"
197+
images={
198+
character.metadata?.content?.avatars || []
199+
}
200+
name={character.metadata?.content?.name}
201+
size={30}
202+
/>
203+
<span className="flex-1 flex flex-col min-w-0">
204+
<span className="text-left leading-none font-medium truncate">
205+
{character.metadata?.content?.name}
206+
</span>
207+
<span className="text-left leading-none text-xs truncate">
208+
{"@" + character.handle}
209+
</span>
210+
</span>
211+
{character.primary && (
212+
<span className="font-medium text-xs text-yellow-300 ml-2">
213+
🌟 Primary
214+
</span>
215+
)}
216+
</UniLink>
217+
))
218+
) : (
219+
<span className="px-4 py-2 h-auto flex items-center w-full whitespace-nowrap text-zinc-400">
220+
Empty
221+
</span>
222+
)}
223+
</div>
221224
</div>
222225
</div>
223226
</>

src/components/FollowingButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export const FollowingButton: React.FC<{
100100
}
101101
size={size}
102102
aria-label="follow"
103+
rounded="full"
103104
>
104105
<BellIcon className="h-4 w-4" />
105106
{backlinks.data?.count ? (

src/components/ui/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const Button = React.forwardRef<
5454
disabled={isDisabled || isLoading}
5555
className={clsx(
5656
className,
57-
"button shadow",
57+
"button",
5858
isLoading && "is-loading",
5959
isBlock && `is-block`,
6060
variantColor && `is-${variantColor}`,

0 commit comments

Comments
 (0)