@@ -8,6 +8,7 @@ import useSWR from "swr";
8
8
import { ThreeDotsLoader } from "@/components/Loading" ;
9
9
import { AdminPageTitle } from "@/components/admin/Title" ;
10
10
import { Lock } from "@phosphor-icons/react" ;
11
+ import Text from "@/components-2/Text" ;
11
12
12
13
function Main ( ) {
13
14
const {
@@ -53,71 +54,72 @@ function Main() {
53
54
return < ThreeDotsLoader /> ;
54
55
}
55
56
return (
56
- < div className = "container mx-auto p-4" >
57
- < CardSection className = "mb-8 max-w-2xl bg-white text-text shadow-lg rounded-lg" >
58
- < h3 className = "text-2xl text-text-800 font-bold mb-4 text-text border-b border-b-border pb-2" >
59
- Process with Unstructured API
60
- </ h3 >
57
+ < CardSection className = "max-w-2xl flex flex-col gap-spacing-paragraph" >
58
+ < Text headingH2 > Process with Unstructured API</ Text >
61
59
62
- < div className = "space-y-4" >
63
- < p className = "text-text-600" >
64
- Unstructured extracts and transforms complex data from formats like
65
- .pdf, .docx, .png, .pptx, etc. into clean text for Onyx to ingest.
66
- Provide an API key to enable Unstructured document processing.
67
- < br />
68
- < br /> < strong > Note:</ strong > this will send documents to
69
- Unstructured servers for processing.
70
- </ p >
71
- < p className = "text-text-600" >
72
- Learn more about Unstructured{ " " }
73
- < a
74
- href = "https://docs.unstructured.io/welcome"
75
- target = "_blank"
76
- rel = "noopener noreferrer"
77
- className = "text-blue-500 hover:underline font-medium"
78
- >
79
- here
80
- </ a >
81
- .
82
- </ p >
83
- < div className = "mt-4" >
84
- { isApiKeySet ? (
85
- < div className = "w-full p-3 border rounded-md bg-background text-text flex items-center" >
86
- < span className = "flex-grow" > ••••••••••••••••</ span >
87
- < Lock className = "h-5 w-5 text-text-400" />
88
- </ div >
89
- ) : (
90
- < input
91
- type = "text"
92
- placeholder = "Enter API Key"
93
- value = { apiKey }
94
- onChange = { ( e ) => setApiKey ( e . target . value ) }
95
- className = "w-full p-3 border rounded-md bg-background text-text focus:ring-2 focus:ring-blue-500 transition duration-200"
96
- />
97
- ) }
98
- </ div >
99
- < div className = "flex space-x-4 mt-6" >
100
- { isApiKeySet ? (
101
- < >
102
- < Button onClick = { handleDelete } variant = "destructive" >
103
- Delete API Key
104
- </ Button >
105
- < p className = "text-text-600 my-auto" >
106
- Delete the current API key before updating.
107
- </ p >
108
- </ >
109
- ) : (
110
- < Button
111
- onClick = { handleSave }
112
- className = "bg-blue-500 text-white hover:bg-blue-600 transition duration-200"
113
- >
114
- Save API Key
60
+ < div className = "border-b" />
61
+
62
+ < div className = "space-y-4" >
63
+ < Text text04 >
64
+ Unstructured extracts and transforms complex data from formats like
65
+ .pdf, .docx, .png, .pptx, etc. into clean text for Onyx to ingest.
66
+ Provide an API key to enable Unstructured document processing.
67
+ < br />
68
+ < br />
69
+ < strong > Note:</ strong > This will send documents to Unstructured
70
+ servers for processing.
71
+ </ Text >
72
+
73
+ < Text text04 >
74
+ Learn more about Unstructured{ " " }
75
+ < a
76
+ href = "https://docs.unstructured.io/welcome"
77
+ target = "_blank"
78
+ rel = "noopener noreferrer"
79
+ className = "text-blue-500 hover:underline font-medium"
80
+ >
81
+ here
82
+ </ a >
83
+ .
84
+ </ Text >
85
+
86
+ < div className = "mt-4" >
87
+ { isApiKeySet ? (
88
+ < div className = "w-full p-3 border rounded-md bg-background text-text flex items-center" >
89
+ < span className = "flex-grow" > ••••••••••••••••</ span >
90
+ < Lock className = "h-5 w-5 text-text-400" />
91
+ </ div >
92
+ ) : (
93
+ < input
94
+ type = "text"
95
+ placeholder = "Enter API Key"
96
+ value = { apiKey }
97
+ onChange = { ( e ) => setApiKey ( e . target . value ) }
98
+ className = "w-full p-3 border rounded-md bg-background text-text focus:ring-2 focus:ring-blue-500 transition duration-200"
99
+ />
100
+ ) }
101
+ </ div >
102
+ < div className = "flex space-x-4 mt-6" >
103
+ { isApiKeySet ? (
104
+ < >
105
+ < Button onClick = { handleDelete } variant = "destructive" >
106
+ Delete API Key
115
107
</ Button >
116
- ) }
117
- </ div >
108
+ < p className = "text-text-600 my-auto" >
109
+ Delete the current API key before updating.
110
+ </ p >
111
+ </ >
112
+ ) : (
113
+ < Button
114
+ onClick = { handleSave }
115
+ className = "bg-blue-500 text-white hover:bg-blue-600 transition duration-200"
116
+ >
117
+ Save API Key
118
+ </ Button >
119
+ ) }
118
120
</ div >
119
- </ CardSection >
120
- </ div >
121
+ </ div >
122
+ </ CardSection >
121
123
) ;
122
124
}
123
125
0 commit comments