Skip to content

Commit e940a98

Browse files
committed
chore: implement new components
1 parent 82a00b4 commit e940a98

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

src/App.tsx

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { useEffect, useState } from 'react';
2-
import { detectBrowser } from './utils/detectBrowser';
3-
import { ChromeService, FirefoxService, TranscriptService } from './services';
4-
import { ClipboardIconButton, ClipboardInput } from '@/components/ui/clipboard';
5-
import { Button, ClipboardRoot } from '@chakra-ui/react';
6-
import { InputGroup } from './components/ui/input-group';
7-
import { SkeletonText } from './components/ui/skeleton';
2+
import { Button, Flex, Link, Skeleton, Text } from '@chakra-ui/react';
3+
import { LuExternalLink } from 'react-icons/lu';
4+
import { detectBrowser } from '@/utils/detectBrowser';
5+
import { ClipTranscription } from '@/components/ui/clip-transcription';
6+
import { ChromeService, FirefoxService, TranscriptService } from '@/services';
87
function App() {
98
const [transcriptService, setTranscriptService] = useState<TranscriptService | null>(null);
109
const [textTranscription, setTextTranscript] = useState<string | null | undefined>(null);
@@ -32,26 +31,33 @@ function App() {
3231

3332
return (
3433
<>
35-
<Button style={{ marginBottom: '1rem' }} variant='outline' onClick={onclick}>
34+
<Button variant='outline' marginBottom={4} onClick={onclick}>
3635
Generate Transcript Video 🔥
3736
</Button>
3837

3938
{isLoading ? (
40-
<SkeletonText noOfLines={3} gap='4' />
39+
<Skeleton height='135px' marginBottom={4} />
4140
) : (
4241
textTranscription && (
43-
<ClipboardRoot maxW='400px' value={textTranscription || ''}>
44-
<InputGroup
45-
width='full'
46-
lineHeight={1}
47-
autoFocus
48-
endElement={<ClipboardIconButton me='-2' />}
49-
>
50-
<ClipboardInput />
51-
</InputGroup>
52-
</ClipboardRoot>
42+
<ClipTranscription
43+
textTranscription={textTranscription}
44+
style={{ marginBottom: '1.2rem' }}
45+
/>
5346
)
5447
)}
48+
<Flex justifyContent='center'>
49+
<Text>
50+
Created by{' '}
51+
<Link
52+
variant='underline'
53+
target='_blank'
54+
href='https://github.com/savecoders'
55+
colorPalette='teal'
56+
>
57+
Savecoders <LuExternalLink />
58+
</Link>
59+
</Text>
60+
</Flex>
5561
</>
5662
);
5763
}

0 commit comments

Comments
 (0)