fix(ui): Set page title

This commit is contained in:
Richard Palethorpe
2025-04-02 08:23:12 +01:00
parent 9f77bb99f1
commit 6d9f1a95cc
10 changed files with 88 additions and 36 deletions

View File

@@ -1,9 +1,10 @@
import { useState, useEffect } from 'react';
import { useOutletContext } from 'react-router-dom';
import { useOutletContext, useNavigate } from 'react-router-dom';
import { actionApi } from '../utils/api';
function ActionsPlayground() {
const { showToast } = useOutletContext();
const navigate = useNavigate();
const [actions, setActions] = useState([]);
const [selectedAction, setSelectedAction] = useState('');
const [configJson, setConfigJson] = useState('{}');
@@ -12,6 +13,14 @@ function ActionsPlayground() {
const [loading, setLoading] = useState(false);
const [loadingActions, setLoadingActions] = useState(true);
// Update document title
useEffect(() => {
document.title = 'Actions Playground - LocalAgent';
return () => {
document.title = 'LocalAgent'; // Reset title when component unmounts
};
}, []);
// Fetch available actions
useEffect(() => {
const fetchActions = async () => {