diff --git a/README.md b/README.md index 0ed1defc8..9d0bbaa11 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ -Connection to the ec2 instance with the sphinx-nav code (ask for the pem key) - -`ssh -i ./pemFiles/knowlege-graph-api.pem ec2-user@3.80.198.201` - ## Available Scripts In the project directory, you can run: diff --git a/src/components/App/SideBar/Relevance/Episode/index.tsx b/src/components/App/SideBar/Relevance/Episode/index.tsx index 789eef76e..2cdbb5a49 100644 --- a/src/components/App/SideBar/Relevance/Episode/index.tsx +++ b/src/components/App/SideBar/Relevance/Episode/index.tsx @@ -51,6 +51,7 @@ export type Props = { showTitle?: string text?: string link?: string + sourceLink?: string type?: string name?: string verified?: boolean @@ -73,6 +74,7 @@ export const Episode = ({ name, profilePicture, link, + sourceLink, verified = false, twitterHandle, className = 'episode-wrapper', @@ -86,9 +88,9 @@ export const Episode = ({ const defaultViewTypes = ['tweet', 'person', 'guest', 'topic'] - return ( + return type ? ( - {type && !defaultViewTypes.includes(type) ? ( + {!defaultViewTypes.includes(type) ? ( {!isSelectedView && ( @@ -101,7 +103,7 @@ export const Episode = ({ {type && } - {type === 'youtube' && link ? ( + {type === 'youtube' && sourceLink ? ( e.stopPropagation()}> @@ -144,7 +146,7 @@ export const Episode = ({ )} - ) + ) : null } export const Description = styled(Flex)` diff --git a/src/components/App/SideBar/Relevance/index.tsx b/src/components/App/SideBar/Relevance/index.tsx index cff89c2f5..643b9f2e3 100644 --- a/src/components/App/SideBar/Relevance/index.tsx +++ b/src/components/App/SideBar/Relevance/index.tsx @@ -66,6 +66,7 @@ export const Relevance = ({ isSearchResult }: Props) => { show_title: showTitle, node_type: nodeType, text, + source_link: sourceLink, link, name, profile_picture: profilePicture, @@ -87,6 +88,7 @@ export const Relevance = ({ isSearchResult }: Props) => { onClick={() => handleNodeClick(n)} profilePicture={profilePicture} showTitle={formatDescription(showTitle)} + sourceLink={sourceLink} text={text || ''} twitterHandle={twitterHandle} type={nodeType || type} diff --git a/src/components/App/SideBar/YouTube/index.tsx b/src/components/App/SideBar/YouTube/index.tsx index 4c5b1802b..52aaae88d 100644 --- a/src/components/App/SideBar/YouTube/index.tsx +++ b/src/components/App/SideBar/YouTube/index.tsx @@ -40,7 +40,7 @@ export const YouTube = () => { if (isReady) { player?.seekTo(secs) - player?.getInternalPlayer()?.play() + typeof player?.getInternalPlayer()?.playVideo === 'function' && player?.getInternalPlayer().playVideo() } if (scrollTargetRef.current) { diff --git a/src/types/index.ts b/src/types/index.ts index a47dc85c8..39d96d814 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -58,6 +58,7 @@ export type Node = { message_content?: string keyword?: boolean label: string + source_link?: string link?: string name: string node_type: string