Skip to content

Commit 47781c6

Browse files
committed
1 parent 9f96342 commit 47781c6

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/components/map-projects/Candidates.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ const CandidateList = ({candidates, header, rowIndex, orderBy, order, onOrderCha
136136

137137
const Candidates = ({rowIndex, alert, setAlert, candidates, orderBy, order, onOrderChange, setShowItem, showItem, setShowHighlights, isSelectedForMap, onMap, onFetchMore, isLoading, candidatesScore, repoVersion, analysis, onFetchRecommendation, appliedFacets, setAppliedFacets, filters, facets, columns, defaultFilters, locales, bridgeCandidates, models, selectedModel, onModelChange}) => {
138138
/*eslint no-undef: 0*/
139-
const inAIAssistantGroup = Boolean(hasAuthGroup(getCurrentUser(), 'mapper_ai_assistant') && process.env.AI_ASSISTANT_API_URL)
139+
const AI_ASSISTANT_API_URL = window.AI_ASSISTANT_API_URL || process.env.AI_ASSISTANT_API_URL
140+
const inAIAssistantGroup = Boolean(hasAuthGroup(getCurrentUser(), 'mapper_ai_assistant') && AI_ASSISTANT_API_URL)
140141
const [openFilters, setOpenFilters] = React.useState(false)
141142
const [display, setDisplay] = React.useState('card')
142143
const [openAIAnalysis, setOpenAIAnalysis] = React.useState(false)

src/components/map-projects/MapProject.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ const MapProject = () => {
209209

210210
const [permissionDenied, setPermissionDenied] = React.useState(false)
211211

212+
/*eslint no-undef: 0*/
213+
let AI_ASSISTANT_API_URL = window.AI_ASSISTANT_API_URL || process.env.AI_ASSISTANT_API_URL
214+
215+
212216
// algos
213217
const [algos, setAlgos] = React.useState([
214218
{id: 'es', label: 'Generic Elastic Search Matching', description: "Token and Keyword based search using ES"},
@@ -1564,8 +1568,6 @@ const MapProject = () => {
15641568

15651569
const fetchAIModels = () => {
15661570
if(!AIModels.length) {
1567-
/*eslint no-undef: 0*/
1568-
let AI_ASSISTANT_API_URL = process.env.AI_ASSISTANT_API_URL
15691571
if(!AI_ASSISTANT_API_URL) {
15701572
return
15711573
}
@@ -1582,8 +1584,6 @@ const MapProject = () => {
15821584
}
15831585

15841586
const fetchRecommendation = _row => {
1585-
/*eslint no-undef: 0*/
1586-
let AI_ASSISTANT_API_URL = process.env.AI_ASSISTANT_API_URL
15871587
if(!AI_ASSISTANT_API_URL) {
15881588
console.error('AI ASSISTANT is not enabled for you.')
15891589
return

src/services/LazyLoader.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if (!window.React) window.React = React
2121
const Lazy = React.lazy(async () => {
2222
/*eslint no-undef: 0*/
2323
/*eslint no-undef: 0*/
24-
let bridgeComponentURL = process.env.BRIDGE_MATCH_URL || ''
24+
let bridgeComponentURL = window.BRIDGE_MATCH_URL || process.env.BRIDGE_MATCH_URL || ''
2525
if(!bridgeComponentURL)
2626
return { default: BridgeMatchStub }
2727

0 commit comments

Comments
 (0)