Fix team boards not appearing after creation
Board creation from team context was not passing teamId to the API, causing boards to be saved as personal boards instead of team boards. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
8cd3c03702
commit
28246b8c52
2 files changed
+5
-4
No files matched your search
@@ -41,7 +41,7 @@ export function BoardProvider({
|
||||
const { touch } = useModified();
|
||||
const { toast } = useToast();
|
||||
const { t, labels, messages } = useMessages();
|
||||
const { router, renderUrl } = useNavigation();
|
||||
const { router, renderUrl, teamId } = useNavigation();
|
||||
|
||||
const [board, setBoard] = useState<Partial<Board>>(data ?? createDefaultBoard());
|
||||
const layoutGetterRef = useRef<LayoutGetter | null>(null);
|
||||
@@ -61,7 +61,7 @@ export function BoardProvider({
|
||||
if (boardData.id) {
|
||||
return post(`/boards/${boardData.id}`, boardData);
|
||||
}
|
||||
return post('/boards', { ...boardData, type: 'dashboard', slug: '' });
|
||||
return post('/boards', { ...boardData, type: 'dashboard', slug: '', teamId });
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -5,18 +5,19 @@ import { LinkButton } from '@/components/common/LinkButton';
|
||||
import { PageBody } from '@/components/common/PageBody';
|
||||
import { PageHeader } from '@/components/common/PageHeader';
|
||||
import { Panel } from '@/components/common/Panel';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { useMessages, useNavigation } from '@/components/hooks';
|
||||
import { Plus } from '@/components/icons';
|
||||
import { BoardsDataTable } from './BoardsDataTable';
|
||||
|
||||
export function BoardsPage() {
|
||||
const { t, labels } = useMessages();
|
||||
const { renderUrl } = useNavigation();
|
||||
|
||||
return (
|
||||
<PageBody>
|
||||
<Column margin="2">
|
||||
<PageHeader title={t(labels.boards)}>
|
||||
<LinkButton href="/boards/create" variant="primary">
|
||||
<LinkButton href={renderUrl('/boards/create')} variant="primary">
|
||||
<IconLabel icon={<Plus />} label={t(labels.addBoard)} />
|
||||
</LinkButton>
|
||||
</PageHeader>
|
||||
|
||||
Reference in new issue
Block a user