Skip to content

Commit 37a1af5

Browse files
authored
Merge pull request #482 from ruisaraiva19/develop
2 parents a82367e + 04a34e0 commit 37a1af5

23 files changed

Lines changed: 3574 additions & 3199 deletions

File tree

.github/workflows/commitlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v3
1212
with:
1313
fetch-depth: 0
1414
- name: Lint commit messages

.github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v3
1212
- name: Setup Node.js
13-
uses: actions/setup-node@v2
13+
uses: actions/setup-node@v3
1414
with:
15-
node-version-file: '.nvmrc'
16-
cache: 'yarn'
15+
node-version-file: ".nvmrc"
16+
cache: "yarn"
1717
- name: Install dependencies
1818
run: yarn install --frozen-lockfile
1919
- name: Lint Scripts

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
1515
- name: Setup Node.js
16-
uses: actions/setup-node@v2
16+
uses: actions/setup-node@v3
1717
with:
18-
node-version-file: '.nvmrc'
19-
cache: 'yarn'
18+
node-version-file: ".nvmrc"
19+
cache: "yarn"
2020
- name: Install dependencies
2121
run: yarn install --frozen-lockfile
2222
- name: Cache Next.js build cache
23-
uses: actions/cache@v2
23+
uses: actions/cache@v3
2424
with:
2525
path: ${{ github.workspace }}/.next/cache
2626
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
2727
- name: Build static assets
2828
run: yarn build
2929
- name: Semantic Release
30-
uses: cycjimmy/semantic-release-action@v2
30+
uses: cycjimmy/semantic-release-action@v3
3131
env:
3232
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ jobs:
77
name: Run Cypress
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1111

1212
- name: Setup Node.js
13-
uses: actions/setup-node@v2
13+
uses: actions/setup-node@v3
1414
with:
15-
node-version-file: '.nvmrc'
16-
cache: 'yarn'
15+
node-version-file: ".nvmrc"
16+
cache: "yarn"
1717

1818
- name: Install dependencies
1919
run: yarn install --frozen-lockfile
2020

2121
- name: Cache Next.js build cache
22-
uses: actions/cache@v2
22+
uses: actions/cache@v3
2323
with:
2424
path: ${{ github.workspace }}/.next/cache
2525
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
@@ -28,21 +28,21 @@ jobs:
2828
run: yarn build
2929

3030
- name: Run Cypress
31-
uses: cypress-io/github-action@v2
31+
uses: cypress-io/github-action@v4
3232
with:
3333
start: npm start
3434
wait-on: http://localhost:3000
3535
# after the test run completes
3636
# store videos and any screenshots
3737
# NOTE: screenshots will be generated only if E2E test failed
3838
# thus we store screenshots only on failures
39-
- uses: actions/upload-artifact@v2
39+
- uses: actions/upload-artifact@v3
4040
if: failure()
4141
with:
4242
name: cypress-screenshots
4343
path: cypress/screenshots
4444
# Test run video was always captured, so this action uses "always()" condition
45-
- uses: actions/upload-artifact@v2
45+
- uses: actions/upload-artifact@v3
4646
if: always()
4747
with:
4848
name: cypress-videos

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.18
1+
16.15

.prettierrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
2-
"useTabs": true,
2+
"useTabs": true,
33
"printWidth": 120,
44
"singleQuote": true,
55
"trailingComma": "es5",
6-
"jsxBracketSameLine": true,
76
"semi": false
87
}

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
"css.validate": false,
1010
"less.validate": false,
1111
"scss.validate": false,
12-
"cssModules.camelCase": true
12+
"typescript.tsdk": "node_modules/typescript/lib"
1313
}

components/button/index.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.base {
44
padding: 5px 12px;
5-
font-family: Manrope, Arial, '"Helvetica Neue"', Helvetica, sans-serif;
5+
font-family: 'Manrope', Arial, '"Helvetica Neue"', Helvetica, sans-serif;
66
font-size: $font-size-title;
77
line-height: $line-height-title;
88
color: $black;

components/drag-and-drop/index.tsx

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ const DragAndDrop = ({ onFile, onGenerate, onError }: DragAndDropProps) => {
208208
}
209209

210210
const { getRootProps, getInputProps, isDragActive } = useDropzone({
211+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
211212
onDrop,
212213
accept: Object.keys(ACCEPT_MIME_TYPES),
213214
maxSize: ONE_MB,
@@ -230,13 +231,15 @@ const DragAndDrop = ({ onFile, onGenerate, onError }: DragAndDropProps) => {
230231
className={classnames(styles.container, {
231232
[styles.loading]: isLoading,
232233
[styles.transparent]: !image,
233-
})}>
234+
})}
235+
>
234236
{!image && !zipData && (
235237
<>
236238
<div
237239
className={styles.dropZoneWrapper}
238240
onMouseEnter={() => setIsHover(true)}
239-
onMouseLeave={() => setIsHover(false)}>
241+
onMouseLeave={() => setIsHover(false)}
242+
>
240243
<SvgDropZone className={classnames(styles.dashed, { [styles.dragActive]: isDragActive })} />
241244
<div {...getRootProps()} className={styles.dropZone} data-cy="drag-and-drop">
242245
<input {...getInputProps()} />
@@ -249,7 +252,8 @@ const DragAndDrop = ({ onFile, onGenerate, onError }: DragAndDropProps) => {
249252
className={classnames(styles.imageUploadText, styles.mobileUploadText, {
250253
[styles.dragActive]: isDragActive,
251254
})}
252-
data-cy="drag-and-drop-text">
255+
data-cy="drag-and-drop-text"
256+
>
253257
<span>
254258
Generate all the sizes for your
255259
<br />
@@ -262,7 +266,8 @@ const DragAndDrop = ({ onFile, onGenerate, onError }: DragAndDropProps) => {
262266
className={classnames(styles.imageUploadText, styles.desktopUploadText, {
263267
[styles.dragActive]: isDragActive,
264268
})}
265-
data-cy="drag-and-drop-text">
269+
data-cy="drag-and-drop-text"
270+
>
266271
<CSSTransition in={!isDragActive} timeout={200} classNames="collapse" unmountOnExit>
267272
<span>Drag &amp;&nbsp;</span>
268273
</CSSTransition>
@@ -313,7 +318,8 @@ const DragAndDrop = ({ onFile, onGenerate, onError }: DragAndDropProps) => {
313318
weight="semiBold"
314319
color="gray"
315320
tag="div"
316-
className={styles.filenameWrapper}>
321+
className={styles.filenameWrapper}
322+
>
317323
<span className={styles.filename} data-cy="preview-filename">
318324
{imageData.name}
319325
{imageData.extension}
@@ -357,7 +363,8 @@ const DragAndDrop = ({ onFile, onGenerate, onError }: DragAndDropProps) => {
357363
id="pwa"
358364
disabled={PWADisabled}
359365
onChange={togglePwa}
360-
data-cy="preview-pwa-compatible">
366+
data-cy="preview-pwa-compatible"
367+
>
361368
<Typography variant="regularBody" weight="semiBold" muted={PWADisabled}>
362369
PWA compatible
363370
</Typography>
@@ -373,7 +380,8 @@ const DragAndDrop = ({ onFile, onGenerate, onError }: DragAndDropProps) => {
373380
id="dark"
374381
disabled
375382
onChange={toggleDarkMode}
376-
data-cy="preview-dark-mode-version">
383+
data-cy="preview-dark-mode-version"
384+
>
377385
<Typography variant="regularBody" weight="semiBold" muted>
378386
Dark Mode version
379387
</Typography>
@@ -392,14 +400,18 @@ const DragAndDrop = ({ onFile, onGenerate, onError }: DragAndDropProps) => {
392400
onClick={() => {
393401
splitbee.track('Re-upload')
394402
resetImage()
395-
}}>
403+
}}
404+
>
396405
Re-upload
397406
</Button>
398407
<Button
399408
color="white"
400409
background="bgLink"
401410
className={styles.imageGenerate}
402-
onClick={() => generateFavicon(image)}>
411+
onClick={() => {
412+
generateFavicon(image)
413+
}}
414+
>
403415
Generate Favicon
404416
</Button>
405417
</div>
@@ -442,7 +454,8 @@ const DragAndDrop = ({ onFile, onGenerate, onError }: DragAndDropProps) => {
442454
className={styles.showCode}
443455
variant="regularTransparent"
444456
color="gray"
445-
onClick={() => setIsModalOpen(true)}>
457+
onClick={() => setIsModalOpen(true)}
458+
>
446459
Show
447460
</Button>
448461
</div>
@@ -455,14 +468,16 @@ const DragAndDrop = ({ onFile, onGenerate, onError }: DragAndDropProps) => {
455468
onClick={() => {
456469
splitbee.track('Make a new one')
457470
resetImage()
458-
}}>
471+
}}
472+
>
459473
Make a new one
460474
</Button>
461475
<Button
462476
color="white"
463477
background="bgGreen"
464478
className={styles.imageGenerate}
465-
onClick={() => onDownload(zipData)}>
479+
onClick={() => onDownload(zipData)}
480+
>
466481
Download Favicon
467482
</Button>
468483
</div>
@@ -475,7 +490,8 @@ const DragAndDrop = ({ onFile, onGenerate, onError }: DragAndDropProps) => {
475490
className={styles.content}
476491
overlayClassName={styles.overlay}
477492
closeTimeoutMS={200}
478-
contentLabel="Code generated">
493+
contentLabel="Code generated"
494+
>
479495
<div className={styles.modalContainer} {...bind()}>
480496
<div className={classnames(styles.modalHeader, styles.modalHeaderMobile)}>
481497
<Typography variant="extraLargeTitle" weight="extraBold" color="white" colorImmutable>

components/favycon-error/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ const FavyconError = ({ error, clearError }: FavyconErrorProps) => {
3838
variant="regularBody"
3939
color="white"
4040
colorImmutable={true}
41-
weight="semiBold">
41+
weight="semiBold"
42+
>
4243
{error}
4344
</Typography>
4445
<svg height={20} width={20}>

0 commit comments

Comments
 (0)