Skip to content

Commit

Permalink
fix: truncate address
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryQW committed Oct 31, 2023
1 parent 98e37c9 commit e4c2f22
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions packages/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-toast": "^1.1.5",
"@rss3/js-sdk": "^0.6.48",
"ahooks": "^3.7.8",
"autoprefixer": "^10.4.16",
"class-variance-authority": "^0.7.0",
Expand Down
8 changes: 3 additions & 5 deletions packages/site/src/pages/monitor/create.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { useState, useEffect, useMemo, useContext } from 'react';
import { formatAddressAndNS } from '@rss3/js-sdk';
import * as z from 'zod';
import { type Profile } from '@rss3/js-sdk';
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { navigate } from 'gatsby';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';

import {
addProfilesToMonitorFollowing,
getProfilesFilterBySearch,
Expand Down Expand Up @@ -255,11 +257,7 @@ const MonitorCreate = () => {
</AvatarFallback>
</Avatar>
<h3 className="text-sm text-muted-foreground">
{(item.handle?.length ?? 0) > 10
? `${item.handle?.slice(0, 6)}...${item.handle?.slice(
-8,
)}`
: item.handle}
{item.handle && formatAddressAndNS(item.handle)}
</h3>
</div>
<p className="text-sm line-clamp-1 min-h-[20px]">
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Powered by RSS3's social aggretation capability, a truly platform-agnostic way t

## Getting Started

Simply visit <snap.rss3.io> and install the Snap.
Simply visit <https://snap.rss3.io> and install the Snap.

Permissionless, no registation required.

Expand Down
2 changes: 1 addition & 1 deletion packages/snap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rss3/social-notifier-snap",
"version": "0.1.3",
"version": "0.1.4",
"description": "Get notifications when your Web3 frens produce new activities.",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"version": "0.1.3",
"version": "0.1.4",
"description": "Get notifications when your Web3 frens produce new activities.",
"proposedName": "RSS3 Social Notifier",
"repository": {
"type": "git",
"url": "https://github.com/NaturalSelectionLabs/RSS3-Social-Notifier-Snap.git"
},
"source": {
"shasum": "cdaBco1MFGRvH8wcSjgg3b9jG/NbLpmxZkyNKZR4WeA=",
"shasum": "G1LtU0segj3vXEI9lPqQv9NgLB4kbjCD6L67xvyxJqI=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6114,6 +6114,17 @@ __metadata:
languageName: node
linkType: hard

"@rss3/js-sdk@npm:^0.6.48":
version: 0.6.48
resolution: "@rss3/js-sdk@npm:0.6.48"
dependencies:
debug: ^4.3.4
openapi-fetch: ^0.7.10
qs: ^6.11.2
checksum: 343257a10f1a1d9b2dc2db20d0c27cc734680f2b1d2f8da7a29d7910a6ce821a0e3bb440e04551de6a00797e4940b67804b461ae0613e000f4b355d767ced445
languageName: node
linkType: hard

"@rss3/social-notifier-snap@workspace:packages/snap":
version: 0.0.0-use.local
resolution: "@rss3/social-notifier-snap@workspace:packages/snap"
Expand Down Expand Up @@ -21261,6 +21272,7 @@ __metadata:
"@radix-ui/react-label": ^2.0.2
"@radix-ui/react-slot": ^1.0.2
"@radix-ui/react-toast": ^1.1.5
"@rss3/js-sdk": ^0.6.48
"@testing-library/dom": ^8.17.1
"@testing-library/jest-dom": ^5.16.4
"@testing-library/react": ^13.3.0
Expand Down

0 comments on commit e4c2f22

Please sign in to comment.