shivam413 commited on
Commit
8a0fc61
·
verified ·
1 Parent(s): ce6b25d

Update components/playlist/PlaylistItem.tsx

Browse files
Files changed (1) hide show
  1. components/playlist/PlaylistItem.tsx +13 -21
components/playlist/PlaylistItem.tsx CHANGED
@@ -1,5 +1,5 @@
1
  import React, { FC, useEffect, useState, useRef } from "react"
2
- import { Draggable as _Draggable, DraggableProps } from "react-beautiful-dnd"
3
  import classNames from "classnames"
4
  import { MediaElement } from "../../lib/types"
5
  import NewTabLink from "../action/NewTabLink"
@@ -12,9 +12,6 @@ import IconPlay from "../icon/IconPlay"
12
  import IconDisk from "../icon/IconDisk"
13
  import { getDomain } from "../../lib/utils"
14
 
15
- // HACK: this fixes type incompatibility
16
- const Draggable = _Draggable as unknown as FC<DraggableProps>
17
-
18
  interface Props {
19
  playing: boolean
20
  item: MediaElement
@@ -115,23 +112,18 @@ const PlaylistItem: FC<Props> = ({
115
  }}
116
  interaction={() => {}}
117
  >
118
- {playing ? (
119
- <IconDisk
120
- className={"animate-spin animate-pulse text-purple-700"}
121
- />
122
- ) : (
123
- <IconPlay
124
- className={"text-primary-900 hover:text-primary-900"}
125
- />
126
- )}
127
  </ControlButton>
128
- <NewTabLink
129
- href={item.src[0].src}
130
- className={"flex flex-row gap-1"}
131
- >
132
- <div className={"line-clamp-2"}>{getDomain(item.src[0].src)}</div>
133
- <IconNewTab className={"shrink-0"} />
134
- </NewTabLink>
 
 
 
135
  </div>
136
  </div>
137
  )}
@@ -139,4 +131,4 @@ const PlaylistItem: FC<Props> = ({
139
  )
140
  }
141
 
142
- export default PlaylistItem
 
1
  import React, { FC, useEffect, useState, useRef } from "react"
2
+ import { Draggable } from "@hello-pangea/dnd"
3
  import classNames from "classnames"
4
  import { MediaElement } from "../../lib/types"
5
  import NewTabLink from "../action/NewTabLink"
 
12
  import IconDisk from "../icon/IconDisk"
13
  import { getDomain } from "../../lib/utils"
14
 
 
 
 
15
  interface Props {
16
  playing: boolean
17
  item: MediaElement
 
112
  }}
113
  interaction={() => {}}
114
  >
115
+ <IconPlay />
 
 
 
 
 
 
 
 
116
  </ControlButton>
117
+ <div className={"ml-auto flex flex-row items-center gap-2"}>
118
+ <IconDisk />
119
+ <NewTabLink
120
+ className={"text-sm"}
121
+ href={item.src[0].src}
122
+ >
123
+ <span>{getDomain(item.src[0].src)}</span>
124
+ <IconNewTab />
125
+ </NewTabLink>
126
+ </div>
127
  </div>
128
  </div>
129
  )}
 
131
  )
132
  }
133
 
134
+ export default PlaylistItem