We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f93172 commit 2e10ab5Copy full SHA for 2e10ab5
pages/embed/dashboards/[...location].js
@@ -0,0 +1,20 @@
1
+import { stringify } from 'query-string';
2
+
3
+export const getServerSideProps = async ({ res, query }) => {
4
+ const { widget, location, ...rest } = query || {};
5
+ res.statusCode = 302;
6
+ res.setHeader(
7
+ 'Location',
8
+ `/embed/widget/${widget}/${location.join('/')}${
9
+ rest ? `?${stringify(rest)}` : ''
10
+ }`
11
+ ); // Replace <link> with your url link
12
13
+ return { props: {} };
14
+};
15
16
+const WidgetEmbedLegacyPage = () => {
17
+ return null;
18
19
20
+export default WidgetEmbedLegacyPage;
0 commit comments