Skip to content

Commit

Permalink
4699 update the onboarding app placeholder (twentyhq#5616)
Browse files Browse the repository at this point in the history
  • Loading branch information
martmull committed May 29, 2024
1 parent bcb582f commit 9a23f9b
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type UsePrefetchRunQuery = {
export const usePrefetchRunQuery = <T extends ObjectRecord>({
prefetchKey,
}: UsePrefetchRunQuery) => {
const setPrefetchDataIsLoadedLoaded = useSetRecoilState(
const setPrefetchDataIsLoaded = useSetRecoilState(
prefetchIsLoadedFamilyState(prefetchKey),
);
const { objectMetadataItem } = useObjectMetadataItem({
Expand All @@ -28,6 +28,7 @@ export const usePrefetchRunQuery = <T extends ObjectRecord>({
});

const upsertRecordsInCache = (records: T[]) => {
setPrefetchDataIsLoaded(false);
upsertFindManyRecordsQueryInCache({
queryVariables: PREFETCH_CONFIG[prefetchKey].variables,
recordGqlFields:
Expand All @@ -36,12 +37,12 @@ export const usePrefetchRunQuery = <T extends ObjectRecord>({
objectRecordsToOverwrite: records,
computeReferences: false,
});
setPrefetchDataIsLoadedLoaded(true);
setPrefetchDataIsLoaded(true);
};

return {
objectMetadataItem,
setPrefetchDataIsLoadedLoaded,
setPrefetchDataIsLoaded,
upsertRecordsInCache,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export const prefetchIsLoadedFamilyState = createFamilyState<
PrefetchKey
>({
key: 'prefetchIsLoadedFamilyState',
defaultValue: false,
defaultValue: true,
});
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const StyledTableContainer = styled.div`
export const SignInBackgroundMockPage = () => {
return (
<PageContainer>
<PageHeader title="Objects" Icon={IconBuildingSkyscraper}>
<PageHeader title="Companies" Icon={IconBuildingSkyscraper}>
<PageHotkeysEffect onAddButtonClick={() => {}} />
<PageAddButton onClick={() => {}} />
</PageHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
id: '04b2e9f5-0713-40a5-8216-82802401d33e',
domainName: 'qonto.com',
updatedAt: '2023-11-23T15:38:03.699Z',
employees: null,
employees: 1400,
name: 'Qonto',
favorites: {
__typename: 'FavoriteConnection',
edges: [],
},
address: '',
address: 'OLINDA SAS. 18 rue de Navarin, 75009 Paris',
accountOwner: null,
people: {
__typename: 'PersonConnection',
Expand Down Expand Up @@ -56,8 +56,8 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
idealCustomerProfile: null,
linkedinLink: {
__typename: 'Link',
label: null,
url: null,
label: 'qonto',
url: 'https://www.linkedin.com/company/qonto',
},
opportunities: {
__typename: 'OpportunityConnection',
Expand Down Expand Up @@ -109,13 +109,13 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
id: '0d940997-c21e-4ec2-873b-de4264d89025',
domainName: 'google.com',
updatedAt: '2023-11-23T15:38:03.699Z',
employees: null,
employees: 72_000,
name: 'Google',
favorites: {
__typename: 'FavoriteConnection',
edges: [],
},
address: '',
address: '1600 Amphitheatre Pkwy, Mountain View, CA 94043',
accountOwner: null,
people: {
__typename: 'PersonConnection',
Expand Down Expand Up @@ -280,8 +280,8 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
idealCustomerProfile: null,
linkedinLink: {
__typename: 'Link',
label: null,
url: null,
label: 'google',
url: 'https://www.linkedin.com/company/google',
},
opportunities: {
__typename: 'OpportunityConnection',
Expand All @@ -308,13 +308,13 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
id: '118995f3-5d81-46d6-bf83-f7fd33ea6102',
domainName: 'facebook.com',
updatedAt: '2023-11-23T15:38:03.699Z',
employees: null,
employees: 87_000,
name: 'Facebook',
favorites: {
__typename: 'FavoriteConnection',
edges: [],
},
address: '',
address: '1 Hacker Way, Menlo Park, CA 94025',
accountOwner: null,
people: {
__typename: 'PersonConnection',
Expand Down Expand Up @@ -389,8 +389,8 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
idealCustomerProfile: null,
linkedinLink: {
__typename: 'Link',
label: null,
url: null,
label: 'facebook',
url: 'https://www.linkedin.com/company/facebook',
},
opportunities: {
__typename: 'OpportunityConnection',
Expand Down Expand Up @@ -438,13 +438,13 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
id: '1d3a1c6e-707e-44dc-a1d2-30030bf1a944',
domainName: 'netflix.com',
updatedAt: '2023-11-23T15:38:03.699Z',
employees: null,
employees: 3_000,
name: 'Netflix',
favorites: {
__typename: 'FavoriteConnection',
edges: [],
},
address: '',
address: '121 Albright Way, Los Gatos, CA 95032',
accountOwner: null,
people: {
__typename: 'PersonConnection',
Expand All @@ -458,8 +458,8 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
idealCustomerProfile: null,
linkedinLink: {
__typename: 'Link',
label: null,
url: null,
label: 'netflix',
url: 'https://www.linkedin.com/company/netflix',
},
opportunities: {
__typename: 'OpportunityConnection',
Expand All @@ -486,13 +486,13 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
id: '460b6fb1-ed89-413a-b31a-962986e67bb4',
domainName: 'microsoft.com',
updatedAt: '2023-11-23T15:38:03.699Z',
employees: null,
employees: 221_000,
name: 'Microsoft',
favorites: {
__typename: 'FavoriteConnection',
edges: [],
},
address: '',
address: '1 Microsoft Way, Redmond, WA 98052',
accountOwner: null,
people: {
__typename: 'PersonConnection',
Expand Down Expand Up @@ -597,8 +597,8 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
idealCustomerProfile: null,
linkedinLink: {
__typename: 'Link',
label: null,
url: null,
label: 'microsoft',
url: 'https://www.linkedin.com/company/microsoft',
},
opportunities: {
__typename: 'OpportunityConnection',
Expand Down Expand Up @@ -666,13 +666,13 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
id: '7a93d1e5-3f74-492d-a101-2a70f50a1645',
domainName: 'libeo.io',
updatedAt: '2023-11-23T15:38:03.699Z',
employees: null,
employees: 50,
name: 'Libeo',
favorites: {
__typename: 'FavoriteConnection',
edges: [],
},
address: '',
address: '42 Rue de Paradis, 75010 Paris',
accountOwner: null,
people: {
__typename: 'PersonConnection',
Expand All @@ -686,8 +686,8 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
idealCustomerProfile: null,
linkedinLink: {
__typename: 'Link',
label: null,
url: null,
label: 'libeo',
url: 'https://www.linkedin.com/company/libeo',
},
opportunities: {
__typename: 'OpportunityConnection',
Expand All @@ -714,13 +714,13 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
id: '89bb825c-171e-4bcc-9cf7-43448d6fb278',
domainName: 'airbnb.com',
updatedAt: '2023-11-23T15:38:03.699Z',
employees: null,
employees: 6_000,
name: 'Airbnb',
favorites: {
__typename: 'FavoriteConnection',
edges: [],
},
address: '',
address: '888 Brannan Street San Francisco, CA 94103',
accountOwner: null,
people: {
__typename: 'PersonConnection',
Expand All @@ -734,8 +734,8 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
idealCustomerProfile: null,
linkedinLink: {
__typename: 'Link',
label: null,
url: null,
label: 'airbnb',
url: 'https://www.linkedin.com/company/airbnb',
},
opportunities: {
__typename: 'OpportunityConnection',
Expand All @@ -762,13 +762,13 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
id: '9d162de6-cfbf-4156-a790-e39854dcd4eb',
domainName: 'claap.io',
updatedAt: '2023-11-23T15:38:03.699Z',
employees: null,
employees: 7,
name: 'Claap',
favorites: {
__typename: 'FavoriteConnection',
edges: [],
},
address: '',
address: '901 Fifth Avenue; Suite 1200; Seattle, WA 98164',
accountOwner: null,
people: {
__typename: 'PersonConnection',
Expand All @@ -782,8 +782,8 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
idealCustomerProfile: null,
linkedinLink: {
__typename: 'Link',
label: null,
url: null,
label: 'claap',
url: 'https://www.linkedin.com/company/claap',
},
opportunities: {
__typename: 'OpportunityConnection',
Expand All @@ -810,13 +810,13 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
id: 'a674fa6c-1455-4c57-afaf-dd5dc086361d',
domainName: 'algolia.com',
updatedAt: '2023-11-23T15:38:03.699Z',
employees: null,
employees: 250,
name: 'Algolia',
favorites: {
__typename: 'FavoriteConnection',
edges: [],
},
address: '',
address: '3790 El Camino Real, Unit 518, Palo Alto, CA 94306',
accountOwner: null,
people: {
__typename: 'PersonConnection',
Expand Down Expand Up @@ -861,8 +861,8 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
idealCustomerProfile: null,
linkedinLink: {
__typename: 'Link',
label: null,
url: null,
label: 'algolia',
url: 'https://www.linkedin.com/company/algolia',
},
opportunities: {
__typename: 'OpportunityConnection',
Expand All @@ -889,13 +889,13 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
id: 'a7bc68d5-f79e-40dd-bd06-c36e6abb4678',
domainName: 'samsung.com',
updatedAt: '2023-11-23T15:38:03.699Z',
employees: null,
employees: 400_000,
name: 'Samsung',
favorites: {
__typename: 'FavoriteConnection',
edges: [],
},
address: '',
address: '129, Samsung-ro, Yeongtong-gu, Suwon-si, Gyeonggi-do',
accountOwner: null,
people: {
__typename: 'PersonConnection',
Expand Down Expand Up @@ -940,8 +940,8 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
idealCustomerProfile: null,
linkedinLink: {
__typename: 'Link',
label: null,
url: null,
label: 'samsung',
url: 'https://www.linkedin.com/company/samsung',
},
opportunities: {
__typename: 'OpportunityConnection',
Expand All @@ -968,13 +968,13 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
id: 'aaffcfbd-f86b-419f-b794-02319abe8637',
domainName: 'hasura.io',
updatedAt: '2023-11-23T15:38:03.699Z',
employees: null,
employees: 17_000,
name: 'Hasura',
favorites: {
__typename: 'FavoriteConnection',
edges: [],
},
address: '',
address: '576 Folsom St., Floor 3, San Francisco, CA 94105',
accountOwner: null,
people: {
__typename: 'PersonConnection',
Expand All @@ -988,8 +988,8 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
idealCustomerProfile: null,
linkedinLink: {
__typename: 'Link',
label: null,
url: null,
label: 'hasura',
url: 'https://www.linkedin.com/company/hasura',
},
opportunities: {
__typename: 'OpportunityConnection',
Expand All @@ -1016,13 +1016,13 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
id: 'f33dc242-5518-4553-9433-42d8eb82834b',
domainName: 'wework.com',
updatedAt: '2023-11-23T15:38:03.699Z',
employees: null,
employees: 2_000,
name: 'Wework',
favorites: {
__typename: 'FavoriteConnection',
edges: [],
},
address: '',
address: '575 Lexington Ave 16th Floor, New York',
accountOwner: null,
people: {
__typename: 'PersonConnection',
Expand All @@ -1036,8 +1036,8 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
idealCustomerProfile: null,
linkedinLink: {
__typename: 'Link',
label: null,
url: null,
label: 'wework',
url: 'https://www.linkedin.com/company/wework',
},
opportunities: {
__typename: 'OpportunityConnection',
Expand All @@ -1064,13 +1064,13 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
id: 'fe256b39-3ec3-4fe3-8997-b76aa0bfa408',
domainName: 'linkedin.com',
updatedAt: '2023-11-23T15:38:03.699Z',
employees: null,
employees: 20_000,
name: 'Linkedin',
favorites: {
__typename: 'FavoriteConnection',
edges: [],
},
address: '',
address: '315 Montgomery St, 13th Fl. San Francisco, CA 94104',
accountOwner: null,
people: {
__typename: 'PersonConnection',
Expand Down Expand Up @@ -1145,8 +1145,8 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
idealCustomerProfile: null,
linkedinLink: {
__typename: 'Link',
label: null,
url: null,
label: 'linkedin',
url: 'https://www.linkedin.com/company/linkedin',
},
opportunities: {
__typename: 'OpportunityConnection',
Expand Down
Loading

0 comments on commit 9a23f9b

Please sign in to comment.