> ## Documentation Index
> Fetch the complete documentation index at: https://makeswift-sasha-eng-8460-create-a-guide-for-troubleshooting.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrading to 0.24.0

If you haven't upgraded to `0.23.0` please read the [upgrading
guide](/developer/upgrading/0.23.0).

`v0.24.0` of the runtime rethinks the way we handle draft/preview mode. Refer to
the [official release
notes](https://github.com/makeswift/makeswift/releases/tag/%40makeswift/runtime%400.24.0)
for more details.

## Breaking Changes

### Removed `<DraftModeScript />` and `<PreviewModeScript />`

The `<DraftModeScript />` and `<PreviewModeScript />` components are no longer
necessary to edit your pages within the Makeswift Visual Builder and have been
removed from the runtime. You can safely remove any imports and usages of these
components from your code.

#### App Router

```diff src/app/layout.tsx
import { draftMode } from "next/headers";
- import { DraftModeScript } from "@makeswift/runtime/next/server";
import { MakeswiftProvider } from "@/makeswift/provider";
import "@/makeswift/components";

export default async function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
-      <head>
-         <DraftModeScript />
-       </head>
      <body>
        <MakeswiftProvider previewMode={(await draftMode()).isEnabled}>
          {children}
        </MakeswiftProvider>
      </body>
    </html>
  );
}
```

#### Pages Router

```diff src/pages/_document.tsx
import { Html, Head, Main, NextScript } from "next/document";
- import { PreviewModeScript } from "@makeswift/runtime/next";
import { Document } from "@makeswift/runtime/next/document";

export default class MyDocument extends Document {
  render() {
    return (
      <Html>
        <Head>
-          <PreviewModeScript isPreview={this.props.__NEXT_DATA__.isPreview} />
        </Head>
        <body>
          <Main />
          <NextScript />
        </body>
      </Html>
    );
  }
}
```

### Removed `MAKESWIFT_DRAFT_MODE_PROXY_FORCE_HTTP` environment variable

If your Makeswift site is [deployed with Docker](/developer/guides/deploying/docker), the
`MAKESWIFT_DRAFT_MODE_PROXY_FORCE_HTTP` environment variable is no longer
used or necessary. You can safely remove it from your Docker build.
