Skip to content

Commit 25e3ac4

Browse files
fix: apply prettier formatting
1 parent fd305dc commit 25e3ac4

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/components/MDX/Sandpack/DownloadButton.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ function createZip(files: Record<string, string>): Uint8Array {
116116
return bytes;
117117
}
118118

119-
export function DownloadButton({}: {
120-
providedFiles: Array<string>;
121-
}) {
119+
export function DownloadButton({}: {providedFiles: Array<string>}) {
122120
const {sandpack} = useSandpack();
123121

124122
const downloadZip = () => {
@@ -129,7 +127,8 @@ export function DownloadButton({}: {
129127
for (const [path, file] of Object.entries(sandpack.files)) {
130128
// Zip paths must not start with '/' and should be nested under "sandbox/"
131129
// so extracting the archive creates a tidy top-level folder.
132-
const zipPath = 'sandbox/' + (path.startsWith('/') ? path.slice(1) : path);
130+
const zipPath =
131+
'sandbox/' + (path.startsWith('/') ? path.slice(1) : path);
133132
zipFiles[zipPath] = (file as {code: string}).code ?? '';
134133
}
135134

0 commit comments

Comments
 (0)