fix(ui): Set page title
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user