Fix path to sample file in tour (#5186)

# Description of Changes
Fix path to sample file in tour
This commit is contained in:
James Brunton
2025-12-09 11:43:18 +00:00
committed by GitHub
parent 7faf7e50fa
commit fa4d2bc09a
@@ -1,4 +1,5 @@
import React, { createContext, useContext, useCallback, useRef } from 'react'; import React, { createContext, useContext, useCallback, useRef } from 'react';
import { BASE_PATH } from '@app/constants/app';
import { useFileHandler } from '@app/hooks/useFileHandler'; import { useFileHandler } from '@app/hooks/useFileHandler';
import { useFilesModalContext } from '@app/contexts/FilesModalContext'; import { useFilesModalContext } from '@app/contexts/FilesModalContext';
import { useNavigationActions } from '@app/contexts/NavigationContext'; import { useNavigationActions } from '@app/contexts/NavigationContext';
@@ -110,7 +111,7 @@ export const TourOrchestrationProvider: React.FC<{ children: React.ReactNode }>
const loadSampleFile = useCallback(async () => { const loadSampleFile = useCallback(async () => {
try { try {
const response = await fetch('samples/Sample.pdf'); const response = await fetch(`${BASE_PATH}/samples/Sample.pdf`);
const blob = await response.blob(); const blob = await response.blob();
const file = new File([blob], 'Sample.pdf', { type: 'application/pdf' }); const file = new File([blob], 'Sample.pdf', { type: 'application/pdf' });