File tree Expand file tree Collapse file tree 9 files changed +30
-13
lines changed Expand file tree Collapse file tree 9 files changed +30
-13
lines changed File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
'use client'
2
2
3
3
import React , { useEffect , useState } from 'react'
4
- import { insertRepository } from '@/app/add- repositories/insert-repo'
5
- import Loading from '@/app/add- repositories/loading'
4
+ import { insertRepository } from '@/app/add/ repositories/insert-repo'
5
+ import Loading from '@/app/add/ repositories/loading'
6
6
7
7
export default function AddRepository ( ) {
8
8
const [ owner , setOwner ] = useState ( '' )
@@ -15,6 +15,11 @@ export default function AddRepository() {
15
15
16
16
useEffect ( ( ) => {
17
17
if ( ! submit ) return
18
+ if ( ! owner || ! repo ) {
19
+ setError ( 'You need to provide both owner and repository' )
20
+ setSubmit ( false )
21
+ return
22
+ }
18
23
setSuccess ( null )
19
24
setError ( null )
20
25
const handleInsert = async ( ) => {
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ export default async function ListAvailableWiki() {
14
14
const repositories = await new Repository ( ) . selectAll ( )
15
15
16
16
return (
17
- < ul >
17
+ < div >
18
18
{ repositories ? (
19
19
repositories . map ( ( repo ) => (
20
- < li key = { repo . url } >
21
- < Link href = { `${ repo . owner } /${ repo . repo } ` } >
20
+ < div key = { repo . url } className = 'p-1' >
21
+ < Link href = { `/ ${ repo . owner } /${ repo . repo } ` } >
22
22
< Card >
23
23
< CardHeader >
24
24
< CardTitle >
@@ -42,11 +42,11 @@ export default async function ListAvailableWiki() {
42
42
</ CardContent >
43
43
</ Card >
44
44
</ Link >
45
- </ li >
45
+ </ div >
46
46
) )
47
47
) : (
48
48
< p > No repositories found</ p >
49
49
) }
50
- </ ul >
50
+ </ div >
51
51
)
52
52
}
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
import React , { Suspense } from 'react'
2
- import Loading from '@/app/repositories/loading'
3
- import ListAvailableWiki from '@/app/repositories/ListAvailableWiki'
2
+ import Loading from '@/app/get/ repositories/loading'
3
+ import ListAvailableWiki from '@/app/get/ repositories/ListAvailableWiki'
4
4
5
5
export default async function ListOfAvailableWikiPages ( ) {
6
6
return (
7
7
< div >
8
- < h1 > Available Wiki Pages</ h1 >
8
+ < h1 className = "text-3xl font-bold p-4" > Available Wiki Pages</ h1 >
9
9
< Suspense fallback = { < Loading /> } >
10
10
< ListAvailableWiki />
11
11
</ Suspense >
Original file line number Diff line number Diff line change @@ -20,14 +20,26 @@ export default function Navbar() {
20
20
< NavigationMenu >
21
21
< NavigationMenuList className = "hidden md:flex" >
22
22
< NavigationMenuItem >
23
- < Link href = "/repositories" legacyBehavior passHref >
23
+ < Link href = "/get/ repositories" legacyBehavior passHref >
24
24
< NavigationMenuLink
25
25
className = { cn (
26
26
navigationMenuTriggerStyle ( ) ,
27
27
'w-28'
28
28
) }
29
29
>
30
- Repo
30
+ Repo List
31
+ </ NavigationMenuLink >
32
+ </ Link >
33
+ </ NavigationMenuItem >
34
+ < NavigationMenuItem >
35
+ < Link href = "/add/repositories" legacyBehavior passHref >
36
+ < NavigationMenuLink
37
+ className = { cn (
38
+ navigationMenuTriggerStyle ( ) ,
39
+ 'w-28'
40
+ ) }
41
+ >
42
+ Add Repo
31
43
</ NavigationMenuLink >
32
44
</ Link >
33
45
</ NavigationMenuItem >
Original file line number Diff line number Diff line change 1
- import LLMFactory from '@/app/add- repositories/llm-factory'
1
+ import LLMFactory from '@/app/add/ repositories/llm-factory'
2
2
import { Repository , RepositoryData } from '@/db/models/repository'
3
3
import LLMConfig from '@/llm/llm-config'
4
4
import { InsertRepoService } from '@/service/insert-db'
You can’t perform that action at this time.
0 commit comments