fix schedule

This commit is contained in:
Dobromir Popov
2024-03-02 19:11:23 +02:00
parent 6c6f8f41d0
commit c984490980
5 changed files with 14 additions and 20 deletions

View File

@ -20,10 +20,8 @@ const SchedulePage = () => {
const [htmlContent, setHtmlContent] = useState(""); // State to hold fetched HTML content
useEffect(() => {
// Define an async function to fetch the HTML content
const fetchHtmlContent = async () => {
try {
// Replace '/api/schedule' with your actual API endpoint
const response = await axiosInstance.get('/api/schedule?year=2024&month=1', { responseType: 'text' });
setHtmlContent(response.data); // Set the fetched HTML content in state
} catch (error) {