feat: implement content management dashboard and update proxy configurations to support AI-assisted learning material generation
This commit is contained in:
@@ -16,8 +16,8 @@ const ContentManager = () => {
|
||||
const [actionState, setActionState] = useState({}); // { [topicId]: { loading, error, success } }
|
||||
const [refineText, setRefineText] = useState('');
|
||||
|
||||
const refresh = () => {
|
||||
const fresh = getAllGeneratedContent();
|
||||
const refresh = async () => {
|
||||
const fresh = await getAllGeneratedContent();
|
||||
setItems(fresh);
|
||||
// Keep detail view in sync if its topic was updated
|
||||
if (selected) {
|
||||
@@ -56,8 +56,8 @@ const ContentManager = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const handleDelete = (topicId) => {
|
||||
deleteCachedContent(topicId);
|
||||
const handleDelete = async (topicId) => {
|
||||
await deleteCachedContent(topicId);
|
||||
if (selected?.topic.id === topicId) setSelected(null);
|
||||
setActionState(prev => { const n = { ...prev }; delete n[topicId]; return n; });
|
||||
refresh();
|
||||
|
||||
Reference in New Issue
Block a user