From 6db718ced42d8d53b6281967c7f6e0c369fe4e96 Mon Sep 17 00:00:00 2001 From: aliraza556 Date: Thu, 31 Oct 2024 20:55:06 +0500 Subject: [PATCH] fix(sidebarsubview): bottom boost section cut off --- .../SelectedNodeView/Default/index.tsx | 46 +++++++++++++------ 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/src/components/App/SideBar/SelectedNodeView/Default/index.tsx b/src/components/App/SideBar/SelectedNodeView/Default/index.tsx index ec98f330c..73681c9c3 100644 --- a/src/components/App/SideBar/SelectedNodeView/Default/index.tsx +++ b/src/components/App/SideBar/SelectedNodeView/Default/index.tsx @@ -113,12 +113,13 @@ export const Default = () => { {Object.entries(customKeys) .filter(([key]) => key !== 'media_url' && key !== 'link' && key !== 'pubkey') - .map(([key, value]) => ( + .map(([key, value], index, array) => ( @@ -126,15 +127,18 @@ export const Default = () => { {pubkey && ( - - - - + + + + + + + )} @@ -149,9 +153,16 @@ export const Default = () => { const formatLabel = (label: string) => label.replace(/_/g, ' ').replace(/\b\w/g, (char) => char.toUpperCase()) -type Props = { label: string; value: unknown; hasAudio: boolean; isPlaying: boolean; togglePlay: () => void } +type Props = { + label: string + value: unknown + hasAudio: boolean + isPlaying: boolean + togglePlay: () => void + showDivider: boolean +} -const NodeDetail = ({ label, value, hasAudio, isPlaying, togglePlay }: Props) => { +const NodeDetail = ({ label, value, hasAudio, isPlaying, togglePlay, showDivider }: Props) => { const isLong = (value as string).length > 140 const searchTerm = useAppStore((s) => s.currentSearch) @@ -176,7 +187,7 @@ const NodeDetail = ({ label, value, hasAudio, isPlaying, togglePlay }: Props) => )} - + {showDivider && } ) } @@ -293,3 +304,12 @@ const StyledLinkIcon = styled.a` height: 1.3em; } ` + +const BoostSectionWrapper = styled(Flex)` + padding-bottom: 20px; +` + +const BoostStyledDivider = styled(Divider)` + margin: auto 25px; + opacity: 0.75; +`