Skip to content

Commit f67a71f

Browse files
committed
fix link to prompt in production
1 parent 1aab18a commit f67a71f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/client/components/Courses/Course/Prompt.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import SystemMessage from '../../Chat/SystemMessage'
1010
import { useEditPromptMutation } from '../../../hooks/usePromptMutation'
1111
import { useParams, Link as RouterLink } from 'react-router-dom'
1212
import { IframeCopy } from '../../common/IframeCopy'
13+
import { PUBLIC_URL } from '../../../../config'
1314

1415
const ExpandButton = ({ expand, setExpand }: { expand: boolean; setExpand: SetState<boolean> }) => (
1516
<Button onClick={() => setExpand(!expand)}>{expand ? <ExpandLess /> : <ExpandMore />}</Button>
@@ -28,7 +29,7 @@ const Prompt = ({ prompt, handleDelete, mandatoryPromptId }: { prompt: PromptTyp
2829
const [updatedName, setUpdatedName] = useState(name)
2930
const [updatedHidden, setUpdatedHidden] = useState(hidden)
3031
const [updatedMandatory, setUpdatedMandatory] = useState(mandatory)
31-
const chatPath = `/v2/${courseId}?promptId=${id}`
32+
const chatPath = `/v2/${courseId}${PUBLIC_URL}?promptId=${id}`
3233
const directLink = `${window.location.origin}${chatPath}`
3334

3435
const handleSave = async () => {

0 commit comments

Comments
 (0)