Skip to content

Commit 8a1644a

Browse files
committed
Reformat files with prettier
1 parent 1f67971 commit 8a1644a

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

.prettierignore

+5
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ package.json
99
.vscode/
1010
.snapshots/
1111
*.min.js
12+
*.mdx
13+
*.md
14+
*.html
15+
*.css
16+
*.json

scripts/encode-logos.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ async function encodeLogos() {
99
return new Promise((resolve, reject) => {
1010
const logos = { wordmark: {}, lettermark: {}, logomark: {} };
1111
let count = 0;
12-
variants.forEach((variant) => {
13-
themes.forEach((theme) => {
12+
variants.forEach(variant => {
13+
themes.forEach(theme => {
1414
Svg2Js.default
1515
.convert({
1616
source: `svg/zigurous-${variant}-${theme}.svg`,
1717
})
18-
.then((svg) => {
18+
.then(svg => {
1919
logos[variant][theme] = encode(svg).replace(
2020
"id='Logo'",
21-
`id='zigurous-${variant}-${theme}'`
21+
`id='zigurous-${variant}-${theme}'`,
2222
);
2323

2424
if (++count === variants.length * themes.length) {
@@ -31,7 +31,7 @@ async function encodeLogos() {
3131
});
3232
}
3333

34-
encodeLogos().then((logos) => {
34+
encodeLogos().then(logos => {
3535
const result = JSON.stringify(logos);
3636
clipboardy.writeSync(result);
3737
console.log(result);

src/components/AppFooter.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export default function AppFooter({
2525
className,
2626
copyright = (
2727
<>
28-
Copyright <span aria-hidden>©</span> {new Date().getFullYear()} All Rights
29-
Reserved
28+
Copyright <span aria-hidden>©</span> {new Date().getFullYear()} All
29+
Rights Reserved
3030
</>
3131
),
3232
hideCopyright = false,

src/utils/timing.ts

+9-6
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ export function throttle(fn: Function, wait: number = 300) {
2121
inThrottle = true;
2222
} else {
2323
clearTimeout(lastFn);
24-
lastFn = setTimeout(() => {
25-
if (Date.now() - lastTime >= wait) {
26-
fn.apply(context, args);
27-
lastTime = Date.now();
28-
}
29-
}, Math.max(wait - (Date.now() - lastTime), 0));
24+
lastFn = setTimeout(
25+
() => {
26+
if (Date.now() - lastTime >= wait) {
27+
fn.apply(context, args);
28+
lastTime = Date.now();
29+
}
30+
},
31+
Math.max(wait - (Date.now() - lastTime), 0),
32+
);
3033
}
3134
};
3235
}

0 commit comments

Comments
 (0)