Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GTM_CONTAINER_ID=GTM-XXXXXXX
2 changes: 2 additions & 0 deletions .github/workflows/deploy-s3-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:

- name: Build static export
run: npm run deploy
env:
GTM_CONTAINER_ID: ${{ secrets.DEV_GTM_CONTAINER_ID }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-s3-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:

- name: Build static export
run: npm run deploy
env:
GTM_CONTAINER_ID: ${{ secrets.GTM_CONTAINER_ID }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down
5 changes: 4 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ module.exports = {
"/deploy": { page: "/deploy" }
};
},
assetPrefix: ""
assetPrefix: "",
env: {
GTM_CONTAINER_ID: process.env.GTM_CONTAINER_ID
}
};
2 changes: 2 additions & 0 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Router from "next/router";
import { Provider } from "react-redux";
import initStore from "../src/store";
import Meta from "../src/components/Meta";
import MigrationBanner from "../src/components/MigrationBanner";

class MyApp extends App {
static async getInitialProps({ Component, ctx }) {
Expand All @@ -22,6 +23,7 @@ class MyApp extends App {
return (
<React.Fragment>
<Meta />
<MigrationBanner />
<Container>
<Provider store={store}>
<Component {...pageProps} />
Expand Down
37 changes: 37 additions & 0 deletions pages/_document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import Document, { Html, Head, Main, NextScript } from "next/document";

class MyDocument extends Document {
// eslint-disable-next-line class-methods-use-this
render() {
return (
<Html lang="en">
<Head>
{process.env.GTM_CONTAINER_ID && (
// eslint-disable-next-line react/no-danger
<script
dangerouslySetInnerHTML={{
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','${process.env.GTM_CONTAINER_ID}');`
}}
/>
)}
</Head>
<body>
{process.env.GTM_CONTAINER_ID && (
<noscript>
<iframe
src={`https://www.googletagmanager.com/ns.html?id=${process.env.GTM_CONTAINER_ID}`}
height="0"
width="0"
style={{ display: "none", visibility: "hidden" }}
/>
</noscript>
)}
<Main />
<NextScript />
</body>
</Html>
);
}
}

export default MyDocument;
2 changes: 0 additions & 2 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import PageLoader from "../src/components/UI/PageLoader";
import { brandOrange } from "../src/styles/variables";

const bannerStyle = css`
position: absolute;
top: 0;
width: 100%;
padding: 5px 0px;
background: #ff9933;
Expand Down
35 changes: 35 additions & 0 deletions src/components/MigrationBanner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from "react";
/** @jsx jsx */
import { css, jsx } from "@emotion/core";
import { brandOrange } from "../styles/variables";

const MIGRATION_GUIDE_URL =
"https://docs.opencerts.io/docs/migrations/oa_to_trustvc";

const bannerStyle = css`
width: 100%;
padding: 5px 0px;
background: ${brandOrange};
text-align: center;
font-weight: bold;
`;

const MigrationBanner = () => (
<div css={css(bannerStyle)}>
Please note that as of 1 October 2025, OpenAttestation (OA) has been
deprecated. OpenCerts has since migrated to TrustVC, which uses the W3C
Verifiable Credentials (VC) format.
<br />
Documents previously issued in OA format remain verifiable — no action is
required for existing certificates. However, we recommend upgrading to the
W3C VC format for all new issuances.
<br />
To migrate, please refer to our{" "}
<a href={MIGRATION_GUIDE_URL} target="_blank" rel="noopener noreferrer">
migration guide
</a>
.
</div>
);

export default MigrationBanner;
Loading