# Changelog widget

I've used a product called [Canny](https://canny.io/?ref=shipped.club) to show a Changelog widget inside my products.

<figure><img src="/files/XbQgMi86Ne1rpgh45wNe" alt=""><figcaption></figcaption></figure>

To integrate Canny into your Next.js app you need to apply this changes.

1. update layout.tsx

{% code title="app/layout.tsx" %}

```jsx
import Script from "next/script";

/* .... */

useEffect(() => {
    // @ts-ignore
    if (window?.Canny) {
      // @ts-ignore
      Canny("initChangelog", {
        appID: "<your_canny_app_id>",
      });
    }
    // @ts-ignore
  }, [typeof window === "undefined"]);

/* .... */

<head>
  <Script
    id="canny"
    strategy="afterInteractive"
    dangerouslySetInnerHTML={{
    __html: `
  !function(w,d,i,s){function l(){if(!d.getElementById(i)){var f=d.getElementsByTagName(s)[0],e=d.createElement(s);e.type="text/javascript",e.async=!0,e.src="https://canny.io/sdk.js",f.parentNode.insertBefore(e,f)}}if("function"!=typeof w.Canny){var c=function(){c.q.push(arguments)};c.q=[],w.Canny=c,"complete"===d.readyState?l():w.attachEvent?w.attachEvent("onload",l):w.addEventListener("load",l,!1)}}(window,document,"canny-jssdk","script");
  `,
    }}
  />
</head>
```

{% endcode %}

2. And add the HTML data attribute `data-canny-changelog` to the button that will trigger the Changelog pop-up.

Your Changelog widget should now be ready.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shipped.club/other/changelog-widget.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
