Skip to content

Commit

Permalink
Update download urls
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Aug 22, 2024
1 parent 8327acf commit d44d0c1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/src/components/SampleList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const SampleList: FC<{ pack: string }> = ({ pack }) => {
<h2 className="px-2 text-md font-bold pt-1">Samples</h2>
<ul>
{samples?.map((sample, index) => (
<SampleTray key={index} sample={sample} />
<SampleTray key={index} sampleId={sample} packId={pack} />
))}
</ul>
</div>
Expand Down
18 changes: 15 additions & 3 deletions web/src/components/SampleTray.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
import { FC } from 'react';
import { FaPlay } from 'react-icons/fa';
import { FaDownload, FaPlay } from 'react-icons/fa';

export const SampleTray: FC<{ sample: string }> = ({ sample }) => {
export const SampleTray: FC<{ packId: string; sampleId: string }> = ({
packId,
sampleId,
}) => {
return (
<li className="flex items-center gap-2 p-2 border-b border-neutral-200 hover:bg-neutral-300/10">
<div className="w-10 h-10 rounded-sm bg-neutral-200 flex items-center justify-center text-neutral-500">
<FaPlay />
</div>
<div className="flex-1">
<h3 className="text-base">{sampleId}</h3>
</div>
<div>
<h3 className="text-base">{sample}</h3>
<a
href={`https://github.com/v3xlabs/sample-rip/raw/master/samples/${packId}/${sampleId}`}
target="_blank"
className="btn !py-2 flex"
>
<FaDownload />
</a>
</div>
</li>
);
Expand Down

0 comments on commit d44d0c1

Please sign in to comment.