Update favorites query and state to work with new backend (#2520)
* wip * wip * adding favorite works in the database * favorites are showing in the left drawer * update favoorite NavItem link * wip * adding favorite works * everything seems to work * fix delete bug * fix update favorite position * update Favorite type * Fix --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -1,16 +1,8 @@
|
||||
import { atom } from 'recoil';
|
||||
|
||||
import { Company, Favorite, Person } from '~/generated/graphql';
|
||||
import { Favorite } from '@/favorites/types/Favorite';
|
||||
|
||||
export const favoritesState = atom<
|
||||
Array<
|
||||
Pick<Favorite, 'id' | 'position'> & {
|
||||
company?: Pick<Company, 'id' | 'name' | 'domainName'>;
|
||||
} & {
|
||||
person?: Pick<Person, 'id' | 'firstName' | 'lastName' | 'avatarUrl'>;
|
||||
}
|
||||
>
|
||||
>({
|
||||
export const favoritesState = atom<Favorite[]>({
|
||||
key: 'favoritesState',
|
||||
default: [],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user