diff --git a/src/components/Collapsible/index.tsx b/src/components/Collapsible/index.tsx index 9ef0311d..0fa4af53 100644 --- a/src/components/Collapsible/index.tsx +++ b/src/components/Collapsible/index.tsx @@ -1,10 +1,12 @@ import { Button } from '@/components/ui/button' +import { cn } from '@/lib/utils' import { useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' export default function Collapsible({ alwaysExpand = false, children, + className, threshold = 1000, collapsedHeight = 600, ...props @@ -45,30 +47,30 @@ export default function Collapsible({ }, [alwaysExpand, shouldCollapse]) return ( -
-
- {children} - {shouldCollapse && !expanded && ( -
-
- -
+
+ {children} + {shouldCollapse && !expanded && ( +
+
+
- )} -
+
+ )}
) } diff --git a/src/components/ReplyNote/index.tsx b/src/components/ReplyNote/index.tsx index 529a879a..919a784c 100644 --- a/src/components/ReplyNote/index.tsx +++ b/src/components/ReplyNote/index.tsx @@ -12,6 +12,7 @@ import NoteStats from '../NoteStats' import ParentNotePreview from '../ParentNotePreview' import UserAvatar from '../UserAvatar' import Username from '../Username' +import Collapsible from '../Collapsible' export default function ReplyNote({ event, @@ -35,49 +36,51 @@ export default function ReplyNote({ return (
push(toNote(event))} > - -
-
-
- -
- + +
+ +
+
+
+ +
+ +
+
+
+ {parentEventId && ( + { + e.stopPropagation() + onClickParent() + }} + /> + )} + {show ? ( + + ) : ( + + )}
-
- {parentEventId && ( - { - e.stopPropagation() - onClickParent() - }} - /> - )} - {show ? ( - <> - - - - ) : ( - - )} -
+ + {show && }
) } diff --git a/src/pages/secondary/ProfilePage/index.tsx b/src/pages/secondary/ProfilePage/index.tsx index 4b2208a0..5e1a95ca 100644 --- a/src/pages/secondary/ProfilePage/index.tsx +++ b/src/pages/secondary/ProfilePage/index.tsx @@ -23,6 +23,7 @@ import { useTranslation } from 'react-i18next' import NotFoundPage from '../NotFoundPage' import Followings from './Followings' import Relays from './Relays' +import Collapsible from '@/components/Collapsible' const ProfilePage = forwardRef(({ id, index }: { id?: string; index?: number }, ref) => { const { t } = useTranslation() @@ -116,10 +117,12 @@ const ProfilePage = forwardRef(({ id, index }: { id?: string; index?: number },
- + + + {website && (