Skip to content

Commit 8178c36

Browse files
committed
reformat using VSCODE formatter
1 parent 457ae8b commit 8178c36

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

src/webui/quarto-preview/src/index.tsx

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,34 @@
44
* Copyright (C) 2023 Posit Software, PBC
55
*/
66

7-
import { connectToServer } from './server/connection';
8-
import { navigationHandler } from './server/navigation';
9-
import { progressHandler } from './server/progress';
7+
import { connectToServer } from "./server/connection";
8+
import { navigationHandler } from "./server/navigation";
9+
import { progressHandler } from "./server/progress";
1010

1111
import { handleExternalLinks } from "./frame/links";
12-
import { handleMecaLinks } from './frame/meca';
12+
import { handleMecaLinks } from "./frame/meca";
1313
import { handleRevealMessages } from "./frame/reveal";
1414
import { handleViewerMessages } from "./frame/viewer";
15-
import { handleCommands } from './frame/commands';
16-
17-
import './ui/fluent.css'
15+
import { handleCommands } from "./frame/commands";
1816

17+
import "./ui/fluent.css";
1918

2019
export interface Options {
21-
origin: string | null,
22-
search: string | null,
23-
inputFile: string | null,
20+
origin: string | null;
21+
search: string | null;
22+
inputFile: string | null;
2423
isPresentation: boolean;
2524
}
2625

2726
function init(options: Options) {
28-
2927
try {
30-
3128
// detect dark mode
3229
const darkMode = detectDarkMode();
3330

3431
// server connection
3532
const disconnect = connectToServer([
3633
progressHandler(darkMode),
37-
navigationHandler()
34+
navigationHandler(),
3835
]);
3936

4037
// handle commands
@@ -50,11 +47,10 @@ function init(options: Options) {
5047

5148
// handle messages as approprate for format
5249
if (options.isPresentation) {
53-
handleRevealMessages(disconnect)
50+
handleRevealMessages(disconnect);
5451
} else {
5552
handleViewerMessages(options.inputFile);
5653
}
57-
5854
} catch (error) {
5955
console.error(error);
6056
}
@@ -69,8 +65,4 @@ function detectDarkMode() {
6965
}
7066
}
7167

72-
export { init }
73-
74-
75-
76-
68+
export { init };

0 commit comments

Comments
 (0)