Skip to content

Commit

Permalink
improve script component
Browse files Browse the repository at this point in the history
  • Loading branch information
Caroline DebBaruah authored and Caroline DebBaruah committed Jan 31, 2025
1 parent 2c615e8 commit c36ee87
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion components/TwitterFeed/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
import { css, jsx } from "@emotion/core";
import * as globals from "../globals";
import Head from "next/head";
import Script from "next/script";

export default function TwitterFeed(props) {
return (
<>
<Head>
<script async src="https://platform.twitter.com/widgets.js" />
<Script async src="https://platform.twitter.com/widgets.js" />
</Head>
<div
css={css`
Expand Down
11 changes: 6 additions & 5 deletions pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Document, { Html, Head, Main, NextScript } from "next/document";
import Script from "next/script";

class MyDocument extends Document {
static async getInitialProps(ctx) {
Expand Down Expand Up @@ -111,19 +112,19 @@ class MyDocument extends Document {
rel="stylesheet"
/>
{/* <!-- Global site tag (gtag.js) - Google Analytics --> */}
<script
<Script
async
src="https://www.googletagmanager.com/gtag/js?id=UA-28181852-28"
></script>
></Script>

{/* Chartbeat */}
<script
<Script
async
src="//static.chartbeat.com/js/chartbeat_mab.js"
></script>
></Script>

{/* Broadstreet Ads */}
<script src="https://cdn.broadstreetads.com/init-2.min.js"></script>
<Script src="https://cdn.broadstreetads.com/init-2.min.js"></Script>
</Head>
<body>
<Main />
Expand Down
3 changes: 2 additions & 1 deletion pages/stonewall.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import PageWrapper from "../layouts/PageWrapper";
import Head from "next/head";
/** @jsxImportSource @emotion/react */
import { css, jsx } from "@emotion/core";
import Script from "next/script.js";

import * as globals from "../components/globals";

Expand Down Expand Up @@ -33,7 +34,7 @@ const Stonewall = () => {
return (
<>
<Head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" />
<Script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" />
</Head>
<div
css={css`
Expand Down

0 comments on commit c36ee87

Please sign in to comment.