feat: create default opportunities view on workspace creation + add seed data (#1461)

Closes #1314
This commit is contained in:
Thaïs
2023-09-06 12:05:33 +02:00
committed by GitHub
parent 08b56ec7e2
commit 5c7660f588
8 changed files with 106 additions and 30 deletions

View File

@ -24,9 +24,11 @@ import { isDeeplyEqual } from '~/utils/isDeeplyEqual';
export const useViews = ({
objectId,
onViewCreate,
type,
}: {
objectId: 'company' | 'person';
onViewCreate: (viewId: string) => Promise<void>;
type: ViewType;
}) => {
const [currentTableViewId, setCurrentTableViewId] = useRecoilScopedState(
currentTableViewIdState,
@ -86,6 +88,7 @@ export const useViews = ({
variables: {
where: {
objectId: { equals: objectId },
type: { equals: type },
},
},
onCompleted: (data) => {