|
1 | 1 | "use client";
|
| 2 | + |
2 | 3 | import { AdminPageTitle } from "@/components/admin/Title";
|
3 | 4 | import { ConnectorIcon } from "@/components/icons/icons";
|
4 | 5 | import { SourceCategory, SourceMetadata } from "@/lib/search/interfaces";
|
@@ -34,17 +35,23 @@ import { Credential } from "@/lib/connectors/credentials";
|
34 | 35 | import { SettingsContext } from "@/components/settings/SettingsProvider";
|
35 | 36 | import SourceTile from "@/components/SourceTile";
|
36 | 37 |
|
| 38 | +interface CategorizedSources { |
| 39 | + [key: string]: SourceMetadata[]; |
| 40 | +} |
| 41 | + |
| 42 | +interface SourceTileTooltipWrapperProps { |
| 43 | + sourceMetadata: SourceMetadata; |
| 44 | + preSelect?: boolean; |
| 45 | + federatedConnectors?: FederatedConnectorDetail[]; |
| 46 | + slackCredentials?: Credential<any>[]; |
| 47 | +} |
| 48 | + |
37 | 49 | function SourceTileTooltipWrapper({
|
38 | 50 | sourceMetadata,
|
39 | 51 | preSelect,
|
40 | 52 | federatedConnectors,
|
41 | 53 | slackCredentials,
|
42 |
| -}: { |
43 |
| - sourceMetadata: SourceMetadata; |
44 |
| - preSelect?: boolean; |
45 |
| - federatedConnectors?: FederatedConnectorDetail[]; |
46 |
| - slackCredentials?: Credential<any>[]; |
47 |
| -}) { |
| 54 | +}: SourceTileTooltipWrapperProps) { |
48 | 55 | // Check if there's already a federated connector for this source
|
49 | 56 | const existingFederatedConnector = useMemo(() => {
|
50 | 57 | if (!sourceMetadata.federated || !federatedConnectors) {
|
@@ -189,7 +196,7 @@ export default function Page() {
|
189 | 196 | );
|
190 | 197 | }, [sources, filterSources, searchTerm]);
|
191 | 198 |
|
192 |
| - const categorizedSources = useMemo(() => { |
| 199 | + const categorizedSources = useMemo((): CategorizedSources => { |
193 | 200 | const filtered = filterSources(sources);
|
194 | 201 | const categories = Object.values(SourceCategory).reduce(
|
195 | 202 | (acc, category) => {
|
@@ -286,7 +293,7 @@ export default function Page() {
|
286 | 293 | value={rawSearchTerm} // keep the input bound to immediate state
|
287 | 294 | onChange={(e) => setSearchTerm(e.target.value)}
|
288 | 295 | onKeyDown={handleKeyPress}
|
289 |
| - className="ml-1 w-96 h-9 flex-none rounded-md border border-border bg-background-50 px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring" |
| 296 | + className="ml-1 w-96 h-9 flex-none rounded-md border border-01 bg-background-tint-03 px-3 py-1 text-sm shadow-01 transition-colors placeholder:text-text-03 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-theme-primary-04" |
290 | 297 | />
|
291 | 298 |
|
292 | 299 | {dedupedPopular.length > 0 && (
|
|
0 commit comments