Skip to content

Commit 01ddc11

Browse files
committed
Fix code style with prettier.
1 parent 03fa638 commit 01ddc11

File tree

140 files changed

+1756
-1810
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+1756
-1810
lines changed

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
"hooks": "@/hooks"
1919
},
2020
"iconLibrary": "lucide"
21-
}
21+
}

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ export default tseslint.config(
3636
"@typescript-eslint/no-explicit-any": "off",
3737
},
3838
},
39-
storybook.configs["flat/recommended"]
39+
storybook.configs["flat/recommended"],
4040
);

index.html

Lines changed: 96 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,116 @@
11
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8"/>
3+
<head>
4+
<meta charset="utf-8" />
55
<meta
6-
name="viewport"
7-
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
6+
name="viewport"
7+
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
88
/>
9-
<meta name="theme-color" content="#000000"/>
10-
<link rel="manifest" href="./manifest.json"/>
11-
<link rel="shortcut icon" href="./favicon.ico"/>
9+
<meta name="theme-color" content="#000000" />
10+
<link rel="manifest" href="./manifest.json" />
11+
<link rel="shortcut icon" href="./favicon.ico" />
1212
<title>Atomic CRM</title>
1313

1414
<style>
15-
body {
16-
margin: 0;
17-
padding: 0;
18-
font-family: sans-serif;
19-
}
15+
body {
16+
margin: 0;
17+
padding: 0;
18+
font-family: sans-serif;
19+
}
2020

21-
.loader-container {
22-
display: flex;
23-
align-items: center;
24-
justify-content: center;
25-
flex-direction: column;
26-
position: absolute;
27-
top: 0;
28-
bottom: 0;
29-
left: 0;
30-
right: 0;
31-
background-color: #fafafa;
32-
}
21+
.loader-container {
22+
display: flex;
23+
align-items: center;
24+
justify-content: center;
25+
flex-direction: column;
26+
position: absolute;
27+
top: 0;
28+
bottom: 0;
29+
left: 0;
30+
right: 0;
31+
background-color: #fafafa;
32+
}
3333

34-
/* CSS Spinner from https://projects.lukehaas.me/css-loaders/ */
34+
/* CSS Spinner from https://projects.lukehaas.me/css-loaders/ */
3535

36-
.loader,
37-
.loader:before,
38-
.loader:after {
39-
border-radius: 50%;
40-
}
36+
.loader,
37+
.loader:before,
38+
.loader:after {
39+
border-radius: 50%;
40+
}
4141

42-
.loader {
43-
color: #283593;
44-
font-size: 11px;
45-
text-indent: -99999em;
46-
margin: 55px auto;
47-
position: relative;
48-
width: 10em;
49-
height: 10em;
50-
box-shadow: inset 0 0 0 1em;
51-
-webkit-transform: translateZ(0);
52-
-ms-transform: translateZ(0);
53-
transform: translateZ(0);
54-
}
42+
.loader {
43+
color: #283593;
44+
font-size: 11px;
45+
text-indent: -99999em;
46+
margin: 55px auto;
47+
position: relative;
48+
width: 10em;
49+
height: 10em;
50+
box-shadow: inset 0 0 0 1em;
51+
-webkit-transform: translateZ(0);
52+
-ms-transform: translateZ(0);
53+
transform: translateZ(0);
54+
}
5555

56-
.loader:before,
57-
.loader:after {
58-
position: absolute;
59-
content: "";
60-
}
56+
.loader:before,
57+
.loader:after {
58+
position: absolute;
59+
content: "";
60+
}
6161

62-
.loader:before {
63-
width: 5.2em;
64-
height: 10.2em;
65-
background: #fafafa;
66-
border-radius: 10.2em 0 0 10.2em;
67-
top: -0.1em;
68-
left: -0.1em;
69-
-webkit-transform-origin: 5.2em 5.1em;
70-
transform-origin: 5.2em 5.1em;
71-
-webkit-animation: load2 2s infinite ease 1.5s;
72-
animation: load2 2s infinite ease 1.5s;
73-
}
62+
.loader:before {
63+
width: 5.2em;
64+
height: 10.2em;
65+
background: #fafafa;
66+
border-radius: 10.2em 0 0 10.2em;
67+
top: -0.1em;
68+
left: -0.1em;
69+
-webkit-transform-origin: 5.2em 5.1em;
70+
transform-origin: 5.2em 5.1em;
71+
-webkit-animation: load2 2s infinite ease 1.5s;
72+
animation: load2 2s infinite ease 1.5s;
73+
}
7474

75-
.loader:after {
76-
width: 5.2em;
77-
height: 10.2em;
78-
background: #fafafa;
79-
border-radius: 0 10.2em 10.2em 0;
80-
top: -0.1em;
81-
left: 5.1em;
82-
-webkit-transform-origin: 0px 5.1em;
83-
transform-origin: 0px 5.1em;
84-
-webkit-animation: load2 2s infinite ease;
85-
animation: load2 2s infinite ease;
86-
}
75+
.loader:after {
76+
width: 5.2em;
77+
height: 10.2em;
78+
background: #fafafa;
79+
border-radius: 0 10.2em 10.2em 0;
80+
top: -0.1em;
81+
left: 5.1em;
82+
-webkit-transform-origin: 0px 5.1em;
83+
transform-origin: 0px 5.1em;
84+
-webkit-animation: load2 2s infinite ease;
85+
animation: load2 2s infinite ease;
86+
}
8787

88-
@-webkit-keyframes load2 {
89-
0% {
90-
-webkit-transform: rotate(0deg);
91-
transform: rotate(0deg);
92-
}
93-
100% {
94-
-webkit-transform: rotate(360deg);
95-
transform: rotate(360deg);
96-
}
88+
@-webkit-keyframes load2 {
89+
0% {
90+
-webkit-transform: rotate(0deg);
91+
transform: rotate(0deg);
9792
}
93+
100% {
94+
-webkit-transform: rotate(360deg);
95+
transform: rotate(360deg);
96+
}
97+
}
9898

99-
@keyframes load2 {
100-
0% {
101-
-webkit-transform: rotate(0deg);
102-
transform: rotate(0deg);
103-
}
104-
100% {
105-
-webkit-transform: rotate(360deg);
106-
transform: rotate(360deg);
107-
}
99+
@keyframes load2 {
100+
0% {
101+
-webkit-transform: rotate(0deg);
102+
transform: rotate(0deg);
103+
}
104+
100% {
105+
-webkit-transform: rotate(360deg);
106+
transform: rotate(360deg);
108107
}
108+
}
109109
</style>
110-
</head>
111-
<body>
112-
<div id="root"></div>
113-
<noscript>You need to enable JavaScript to run this app.</noscript>
114-
<script type="module" src="<%- mainScript %>"></script>
115-
</body>
110+
</head>
111+
<body>
112+
<div id="root"></div>
113+
<noscript>You need to enable JavaScript to run this app.</noscript>
114+
<script type="module" src="<%- mainScript %>"></script>
115+
</body>
116116
</html>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { createContext, useContext } from 'react';
1+
import { createContext, useContext } from "react";
22

3-
export type activityLogContextValue = 'company' | 'contact' | 'deal' | 'all';
3+
export type activityLogContextValue = "company" | "contact" | "deal" | "all";
44

5-
export const ActivityLogContext = createContext<activityLogContextValue>('all');
5+
export const ActivityLogContext = createContext<activityLogContextValue>("all");
66

77
export const useActivityLogContext = () => {
8-
const context = useContext(ActivityLogContext);
8+
const context = useContext(ActivityLogContext);
99

10-
return context;
10+
return context;
1111
};

src/atomic-crm/activity/ActivityLogIterator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function ActivityLogIterator({
4242
onClick={(e) => {
4343
e.preventDefault();
4444
setActivityDisplayed(
45-
(activitiesDisplayed) => activitiesDisplayed + pageSize
45+
(activitiesDisplayed) => activitiesDisplayed + pageSize,
4646
);
4747
}}
4848
className="flex w-full justify-center text-sm underline hover:no-underline"

src/atomic-crm/companies/sizes.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const sizes = [
2-
{ id: 1, name: '1 employee' },
3-
{ id: 10, name: '2-9 employees' },
4-
{ id: 50, name: '10-49 employees' },
5-
{ id: 250, name: '50-249 employees' },
6-
{ id: 500, name: '250 or more employees' },
2+
{ id: 1, name: "1 employee" },
3+
{ id: 10, name: "2-9 employees" },
4+
{ id: 50, name: "10-49 employees" },
5+
{ id: 250, name: "50-249 employees" },
6+
{ id: 500, name: "250 or more employees" },
77
];

src/atomic-crm/consts.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export const COMPANY_CREATED = 'company.created' as const;
2-
export const CONTACT_CREATED = 'contact.created' as const;
3-
export const CONTACT_NOTE_CREATED = 'contactNote.created' as const;
4-
export const DEAL_CREATED = 'deal.created' as const;
5-
export const DEAL_NOTE_CREATED = 'dealNote.created' as const;
1+
export const COMPANY_CREATED = "company.created" as const;
2+
export const CONTACT_CREATED = "contact.created" as const;
3+
export const CONTACT_NOTE_CREATED = "contactNote.created" as const;
4+
export const DEAL_CREATED = "deal.created" as const;
5+
export const DEAL_NOTE_CREATED = "dealNote.created" as const;

src/atomic-crm/contacts/ContactListContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const ContactListContent = () => {
2424

2525
// StopPropagation does not work for some reason on Checkbox, this handler is a workaround
2626
const handleLinkClick = useCallback(function handleLinkClick(
27-
e: MouseEvent<HTMLAnchorElement>
27+
e: MouseEvent<HTMLAnchorElement>,
2828
) {
2929
if (e.target instanceof HTMLButtonElement) {
3030
e.preventDefault();

src/atomic-crm/contacts/TagsListEdit.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ export const TagsListEdit = () => {
3030
{
3131
pagination: { page: 1, perPage: 10 },
3232
sort: { field: "name", order: "ASC" },
33-
}
33+
},
3434
);
3535
const { data: tags, isPending: isPendingRecordTags } = useGetMany<Tag>(
3636
"tags",
3737
{ ids: record?.tags },
38-
{ enabled: record && record.tags && record.tags.length > 0 }
38+
{ enabled: record && record.tags && record.tags.length > 0 },
3939
);
4040
const [update] = useUpdate<Contact>();
4141

@@ -91,10 +91,10 @@ export const TagsListEdit = () => {
9191
onSuccess: () => {
9292
setOpen(false);
9393
},
94-
}
94+
},
9595
);
9696
},
97-
[update, record]
97+
[update, record],
9898
);
9999

100100
if (isPendingRecordTags || isPendingAllTags) return null;

src/atomic-crm/contacts/useContactImport.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function useContactImport() {
3535
const companiesCache = useMemo(
3636
() => new Map<string, Company>(),
3737
// eslint-disable-next-line react-hooks/exhaustive-deps
38-
[dataProvider]
38+
[dataProvider],
3939
);
4040
const getCompanies = useCallback(
4141
async (names: string[]) =>
@@ -48,9 +48,9 @@ export function useContactImport() {
4848
created_at: new Date().toISOString(),
4949
sales_id: user?.identity?.id,
5050
}),
51-
dataProvider
51+
dataProvider,
5252
),
53-
[companiesCache, user?.identity?.id, dataProvider]
53+
[companiesCache, user?.identity?.id, dataProvider],
5454
);
5555

5656
// Tags cache to avoid creating the same tag multiple times and costly roundtrips
@@ -67,16 +67,18 @@ export function useContactImport() {
6767
name,
6868
color: "#f9f9f9",
6969
}),
70-
dataProvider
70+
dataProvider,
7171
),
72-
[tagsCache, dataProvider]
72+
[tagsCache, dataProvider],
7373
);
7474

7575
const processBatch = useCallback(
7676
async (batch: ContactImportSchema[]) => {
7777
const [companies, tags] = await Promise.all([
7878
getCompanies(
79-
batch.map((contact) => contact.company?.trim()).filter((name) => name)
79+
batch
80+
.map((contact) => contact.company?.trim())
81+
.filter((name) => name),
8082
),
8183
getTags(batch.flatMap((batch) => parseTags(batch.tags))),
8284
]);
@@ -143,11 +145,11 @@ export function useContactImport() {
143145
linkedin_url,
144146
},
145147
});
146-
}
147-
)
148+
},
149+
),
148150
);
149151
},
150-
[dataProvider, getCompanies, getTags, user?.identity?.id, today]
152+
[dataProvider, getCompanies, getTags, user?.identity?.id, today],
151153
);
152154

153155
return processBatch;
@@ -158,7 +160,7 @@ const fetchRecordsWithCache = async function <T>(
158160
cache: Map<string, T>,
159161
names: string[],
160162
getCreateData: (name: string) => Partial<T>,
161-
dataProvider: DataProvider
163+
dataProvider: DataProvider,
162164
) {
163165
const trimmedNames = [...new Set(names.map((name) => name.trim()))];
164166
const uncachedRecordNames = trimmedNames.filter((name) => !cache.has(name));
@@ -187,7 +189,7 @@ const fetchRecordsWithCache = async function <T>(
187189
data: getCreateData(name),
188190
});
189191
cache.set(name, response.data);
190-
})
192+
}),
191193
);
192194

193195
// now all records are in cache, return a map of all records

0 commit comments

Comments
 (0)