Skip to content

🎥 Make videos programmatically with React

lint

Jonny Burger6469388ed880
diff --git a/packages/convert/app/components/PickFile.tsx b/packages/convert/app/components/PickFile.tsx
index 6146430f98..739eeb284d 100644
--- a/packages/convert/app/components/PickFile.tsx
+++ b/packages/convert/app/components/PickFile.tsx
@@ -3,18 +3,18 @@ import {SAMPLE_FILE} from '~/lib/config';
import {DropFileBox} from './DropFileBox';
export const PickFile: React.FC<{
- setSrc: (str: string) => void;
+ readonly setSrc: (str: string) => void;
}> = ({setSrc}) => {
const onSampleFile = useCallback(() => {
setSrc(SAMPLE_FILE);
- }, []);
+ }, [setSrc]);
return (
<div className="text-center items-center justify-center flex flex-col">
<h1 className="text-center text-4xl font-brand font-bold">
Fast video conversion in the browser
</h1>
- <div className="h-12"></div>
+ <div className="h-12" />
<DropFileBox />
or <a onClick={onSampleFile}>Select a sample file</a>
</div>
diff --git a/packages/convert/app/components/TrackSwitcher.tsx b/packages/convert/app/components/TrackSwitcher.tsx
index 8b8181168f..ea017a91a9 100644
--- a/packages/convert/app/components/TrackSwitcher.tsx
+++ b/packages/convert/app/components/TrackSwitcher.tsx
@@ -18,8 +18,8 @@ export const TrackSwitcher: React.FC<{
<div>
<div className="flex flex-row">
<Button
- onClick={goToOverview}
variant={selectedTrack === null ? 'secondary' : 'link'}
+ onClick={goToOverview}
>
Overview
</Button>
@@ -28,8 +28,8 @@ export const TrackSwitcher: React.FC<{
<React.Fragment key={trk.trackId}>
<Separator orientation="vertical" />
<Button
- onClick={() => onTrack(i)}
variant={selectedTrack === i ? 'secondary' : 'link'}
+ onClick={() => onTrack(i)}
>
Track {trk.trackId}
</Button>
diff --git a/packages/convert/app/components/ui/button.tsx b/packages/convert/app/components/ui/button.tsx
index fc8995ef38..537494dc3f 100644
--- a/packages/convert/app/components/ui/button.tsx
+++ b/packages/convert/app/components/ui/button.tsx
@@ -1,3 +1,4 @@
+/* eslint-disable react/require-default-props */
import {Slot} from '@radix-ui/react-slot';
import {cva, type VariantProps} from 'class-variance-authority';
import * as React from 'react';