diff --git a/apps/u3/package.json b/apps/u3/package.json index 425ef595..30c37388 100644 --- a/apps/u3/package.json +++ b/apps/u3/package.json @@ -33,7 +33,7 @@ "@tiptap/react": "^2.1.13", "@types/validator": "^13.11.7", "@us3r-network/auth-with-rainbowkit": "^0.2.1", - "@us3r-network/link": "0.7.0", + "@us3r-network/link": "0.7.1-alpha.0", "@us3r-network/profile": "0.7.0", "@wagmi/core": "^1.4.12", "@xmtp/content-type-remote-attachment": "^1.1.2", diff --git a/apps/u3/src/components/shared/button/SaveButton.tsx b/apps/u3/src/components/shared/button/SaveButton.tsx index c3d58574..3c98b705 100644 --- a/apps/u3/src/components/shared/button/SaveButton.tsx +++ b/apps/u3/src/components/shared/button/SaveButton.tsx @@ -8,12 +8,17 @@ */ import { FavorButton, FavorButtonProps } from '@us3r-network/link'; import { StarIcon, StarFilledIcon } from '@radix-ui/react-icons'; -import styled from 'styled-components'; -import { ButtonPrimaryLineCss } from '@/components/common/button/ButtonBase'; export function SaveButton({ ...props }: FavorButtonProps) { + if (props.link?.url) { + props.link.url = props.link.url.replace('?', '%3F'); + // todo: 临时解决方案,后续需要在link model里面去掉这个长度限制 + if (props.link.url.length > 100) { + props.link.url = props.link.url.slice(0, 100); + } + } return ( - + {({ isFavoring, isFavored, favorsCount }) => { return (
@@ -29,18 +34,6 @@ export function SaveButton({ ...props }: FavorButtonProps) {
); }} -
+ ); } - -export const FavorButtonStyled = styled(FavorButton)` - ${ButtonPrimaryLineCss} - /* color: #fff; */ - border: none; - background: none; - padding: 6px; - height: 32px; - &:hover { - border: none; - } -`;