Skip to content

Commit a6e945b

Browse files
Fixed formatting
1 parent e5b81a9 commit a6e945b

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export function setupCounter(element: HTMLButtonElement) {
2-
let counter = 0
2+
let counter = 0;
33
const setCounter = (count: number) => {
4-
counter = count
5-
element.innerHTML = `count is ${counter}`
6-
}
7-
element.addEventListener('click', () => setCounter(counter + 1))
8-
setCounter(0)
4+
counter = count;
5+
element.innerHTML = `count is ${counter}`;
6+
};
7+
element.addEventListener("click", () => setCounter(counter + 1));
8+
setCounter(0);
99
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// src/global.d.ts
2-
import NutrientViewer from "@nutrient-sdk/viewer";
2+
import type NutrientViewer from "@nutrient-sdk/viewer";
33

44
declare global {
55
interface Window {
66
// Nutrient Web SDK will be available on window.NutrientViewer once loaded.
77
NutrientViewer?: typeof NutrientViewer;
88
}
9-
}
9+
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// main.ts
2-
import './style.css';
2+
import "./style.css";
33

44
async function load() {
5-
const container = document.querySelector('.container') as HTMLElement;
5+
const container = document.querySelector(".container") as HTMLElement;
66

77
// Wait for SDK script to load (CDN only)
88
while (!window.NutrientViewer) {
9-
await new Promise(resolve => setTimeout(resolve, 100));
9+
await new Promise((resolve) => setTimeout(resolve, 100));
1010
}
1111

1212
// Ensure there's only one NutrientViewer instance
@@ -15,13 +15,13 @@ async function load() {
1515
if (container) {
1616
window.NutrientViewer.load({
1717
container,
18-
document: 'https://www.nutrient.io/downloads/nutrient-web-demo.pdf',
18+
document: "https://www.nutrient.io/downloads/nutrient-web-demo.pdf",
1919
})
2020
.then((instance) => {
21-
console.log('Nutrient loaded', instance);
21+
console.log("Nutrient loaded", instance);
2222
})
2323
.catch(console.error);
2424
}
2525
}
2626

27-
load();
27+
load();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.container {
22
height: 100vh;
3-
}
3+
}

0 commit comments

Comments
 (0)