Bluesky app fork with some witchin' additions 💫

Fix link to like-via-repost (#8428)

authored by samuel.fm and committed by

GitHub 48906481 caf18daa

+27 -20
+27 -20
src/view/com/notifications/NotificationFeedItem.tsx
··· 97 97 const {_, i18n} = useLingui() 98 98 const [isAuthorsExpanded, setAuthorsExpanded] = useState<boolean>(false) 99 99 const itemHref = useMemo(() => { 100 - if (item.type === 'post-like' || item.type === 'repost') { 101 - if (item.subjectUri) { 102 - const urip = new AtUri(item.subjectUri) 103 - return `/profile/${urip.host}/post/${urip.rkey}` 100 + switch (item.type) { 101 + case 'post-like': 102 + case 'repost': 103 + case 'like-via-repost': 104 + case 'repost-via-repost': { 105 + if (item.subjectUri) { 106 + const urip = new AtUri(item.subjectUri) 107 + return `/profile/${urip.host}/post/${urip.rkey}` 108 + } 109 + break 104 110 } 105 - } else if ( 106 - item.type === 'follow' || 107 - item.type === 'verified' || 108 - item.type === 'unverified' 109 - ) { 110 - return makeProfileLink(item.notification.author) 111 - } else if (item.type === 'reply') { 112 - const urip = new AtUri(item.notification.uri) 113 - return `/profile/${urip.host}/post/${urip.rkey}` 114 - } else if ( 115 - item.type === 'feedgen-like' || 116 - item.type === 'starterpack-joined' 117 - ) { 118 - if (item.subjectUri) { 119 - const urip = new AtUri(item.subjectUri) 120 - return `/profile/${urip.host}/feed/${urip.rkey}` 111 + case 'follow': 112 + case 'verified': 113 + case 'unverified': { 114 + return makeProfileLink(item.notification.author) 115 + } 116 + case 'reply': { 117 + const uripReply = new AtUri(item.notification.uri) 118 + return `/profile/${uripReply.host}/post/${uripReply.rkey}` 119 + } 120 + case 'feedgen-like': 121 + case 'starterpack-joined': { 122 + if (item.subjectUri) { 123 + const urip = new AtUri(item.subjectUri) 124 + return `/profile/${urip.host}/feed/${urip.rkey}` 125 + } 126 + break 121 127 } 122 128 } 129 + 123 130 return '' 124 131 }, [item]) 125 132