Skip to content

Commit

Permalink
Merge pull request #638 from stakwork/bugfix/fix-episode
Browse files Browse the repository at this point in the history
feat: fix episodes and youtube view
  • Loading branch information
Rassl authored Nov 24, 2023
2 parents 3860343 + 7215953 commit d9b896d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 [email protected]`

## Available Scripts

In the project directory, you can run:
Expand Down
10 changes: 6 additions & 4 deletions src/components/App/SideBar/Relevance/Episode/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export type Props = {
showTitle?: string
text?: string
link?: string
sourceLink?: string
type?: string
name?: string
verified?: boolean
Expand All @@ -73,6 +74,7 @@ export const Episode = ({
name,
profilePicture,
link,
sourceLink,
verified = false,
twitterHandle,
className = 'episode-wrapper',
Expand All @@ -86,9 +88,9 @@ export const Episode = ({

const defaultViewTypes = ['tweet', 'person', 'guest', 'topic']

return (
return type ? (
<EpisodeWrapper className={className} isSelected={isSelected} onClick={onClick}>
{type && !defaultViewTypes.includes(type) ? (
{!defaultViewTypes.includes(type) ? (
<Flex direction="row">
{!isSelectedView && (
<Flex align="center" pr={16}>
Expand All @@ -101,7 +103,7 @@ export const Episode = ({
<Flex align="center" direction="row">
{type && <TypeBadge type={type} />}
</Flex>
{type === 'youtube' && link ? (
{type === 'youtube' && sourceLink ? (
<StyledLink href={`${link}?open=system`} onClick={(e) => e.stopPropagation()}>
<LinkIcon />
</StyledLink>
Expand Down Expand Up @@ -144,7 +146,7 @@ export const Episode = ({
</>
)}
</EpisodeWrapper>
)
) : null
}

export const Description = styled(Flex)`
Expand Down
2 changes: 2 additions & 0 deletions src/components/App/SideBar/Relevance/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const Relevance = ({ isSearchResult }: Props) => {
show_title: showTitle,
node_type: nodeType,
text,
source_link: sourceLink,
link,
name,
profile_picture: profilePicture,
Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/SideBar/YouTube/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export type Node = {
message_content?: string
keyword?: boolean
label: string
source_link?: string
link?: string
name: string
node_type: string
Expand Down

0 comments on commit d9b896d

Please sign in to comment.