Compare commits
1 Commits
feature/an
...
openspendi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c893911e67 |
3107
examples/openspending/package-lock.json
generated
3107
examples/openspending/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,6 @@
|
||||
"test": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@flowershow/core": "^0.4.13",
|
||||
"@githubocto/flat-ui": "^0.14.1",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"@octokit/plugin-throttling": "^5.2.2",
|
||||
@@ -23,7 +22,7 @@
|
||||
"eslint": "8.39.0",
|
||||
"eslint-config-next": "13.3.1",
|
||||
"flexsearch": "0.7.21",
|
||||
"next": "13.3.0",
|
||||
"next": "13.3.1",
|
||||
"next-seo": "^6.0.0",
|
||||
"octokit": "^2.0.14",
|
||||
"papaparse": "^5.4.1",
|
||||
|
||||
@@ -2,52 +2,10 @@ import { AppProps } from 'next/app';
|
||||
import './styles.css';
|
||||
import { NextSeo } from 'next-seo';
|
||||
|
||||
import { useEffect } from 'react';
|
||||
import { pageview } from '@flowershow/core';
|
||||
import Script from 'next/script';
|
||||
import Head from 'next/head';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
function CustomApp({ Component, pageProps }: AppProps) {
|
||||
const router = useRouter();
|
||||
|
||||
const GA_TOKEN = 'G-GXZF7NRXX6';
|
||||
|
||||
useEffect(() => {
|
||||
const handleRouteChange = (url) => {
|
||||
pageview(url);
|
||||
};
|
||||
router.events.on('routeChangeComplete', handleRouteChange);
|
||||
return () => {
|
||||
router.events.off('routeChangeComplete', handleRouteChange);
|
||||
};
|
||||
}, [router.events]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="shortcut icon" href="/squared_logo.png" />
|
||||
</Head>
|
||||
<NextSeo title="OpenSpending" />
|
||||
<Script
|
||||
strategy="afterInteractive"
|
||||
src={`https://www.googletagmanager.com/gtag/js?id=${GA_TOKEN}`}
|
||||
/>
|
||||
<Script
|
||||
id="gtag-init"
|
||||
strategy="afterInteractive"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', ${GA_TOKEN}, {
|
||||
page_path: window.location.pathname,
|
||||
});
|
||||
`,
|
||||
}}
|
||||
/>
|
||||
|
||||
<main className="app">
|
||||
<Component {...pageProps} />
|
||||
</main>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.0 KiB |
@@ -20,7 +20,6 @@ const config = {
|
||||
// { name: "Components", href: "/docs/components" },
|
||||
{ name: "Blog", href: "/blog" },
|
||||
{ name: "Showcases", href: "/#showcases" },
|
||||
{ name: "Howtos", href: "/howto" },
|
||||
{ name: "Examples", href: "https://github.com/datopian/portaljs/tree/main/examples", target: "_blank" },
|
||||
{ name: "Components", href: "https://storybook.portaljs.org", target: "_blank" },
|
||||
// { name: "DL Demo", href: "/data-literate/demo" },
|
||||
|
||||
Reference in New Issue
Block a user