mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 17:46:06 +00:00
refactor: Update API response handling to access nested data structure
This commit is contained in:
@@ -40,10 +40,11 @@ export default function WorkspaceSettingsPage() {
|
||||
return;
|
||||
}
|
||||
const data = await res.json();
|
||||
setWorkspace(data);
|
||||
const workspace = data.data;
|
||||
setWorkspace(workspace);
|
||||
setFormData({
|
||||
name: data.name,
|
||||
description: data.description || '',
|
||||
name: workspace.name,
|
||||
description: workspace.description || '',
|
||||
});
|
||||
} catch {
|
||||
setError('Failed to load workspace');
|
||||
|
||||
Reference in New Issue
Block a user