|
1 | 1 | 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'; |
8 | 7 | function App() { |
9 | 8 | const [transcriptService, setTranscriptService] = useState<TranscriptService | null>(null); |
10 | 9 | const [textTranscription, setTextTranscript] = useState<string | null | undefined>(null); |
@@ -32,26 +31,33 @@ function App() { |
32 | 31 |
|
33 | 32 | return ( |
34 | 33 | <> |
35 | | - <Button style={{ marginBottom: '1rem' }} variant='outline' onClick={onclick}> |
| 34 | + <Button variant='outline' marginBottom={4} onClick={onclick}> |
36 | 35 | Generate Transcript Video 🔥 |
37 | 36 | </Button> |
38 | 37 |
|
39 | 38 | {isLoading ? ( |
40 | | - <SkeletonText noOfLines={3} gap='4' /> |
| 39 | + <Skeleton height='135px' marginBottom={4} /> |
41 | 40 | ) : ( |
42 | 41 | 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 | + /> |
53 | 46 | ) |
54 | 47 | )} |
| 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> |
55 | 61 | </> |
56 | 62 | ); |
57 | 63 | } |
|
0 commit comments