From d13650ed64e01da022d28f2ed7b4ae45c5252c34 Mon Sep 17 00:00:00 2001 From: Elad Rosenheim Date: Mon, 17 Jun 2024 22:36:47 +0300 Subject: [PATCH] chore: add copy badge button --- e2e-report/app/page.js | 29 +++++++++++++++++++---------- e2e-report/components/copy-badge.js | 18 ++++++++++++++++++ e2e-report/components/icons.js | 19 +++++++++++++++++++ 3 files changed, 56 insertions(+), 10 deletions(-) create mode 100644 e2e-report/components/copy-badge.js diff --git a/e2e-report/app/page.js b/e2e-report/app/page.js index a95dc104a7..5ef6f7c348 100644 --- a/e2e-report/app/page.js +++ b/e2e-report/app/page.js @@ -1,8 +1,11 @@ +/* eslint-disable @next/next/no-img-element */ import Image from 'next/image' import Table from '@/components/table' import ComponentSwitcher from '@/components/switcher' import StatsRow from '@/components/stats' import testData from '@/utils/data' +import { CopyIcon } from '@/components/icons' +import CopyBadgeButton from '@/components/copy-badge' export default function Home() { // User can switch between two test suite tables: one with all non-empty suites, @@ -25,16 +28,22 @@ export default function Home() { function Header() { return ( -
- netlify logo - - Next.js E2E Tests on Netlify Runtime v5 +
+ + netlify logo + Next.js E2E Tests on Netlify Runtime v5 + + + + Netlify Next.js runtime v5 test status + +
) diff --git a/e2e-report/components/copy-badge.js b/e2e-report/components/copy-badge.js new file mode 100644 index 0000000000..ed20e9d5f6 --- /dev/null +++ b/e2e-report/components/copy-badge.js @@ -0,0 +1,18 @@ +'use client' +import { CopyIcon } from './icons' + +const host = 'https://runtime-e2e-report.netlify.app' // fixed +const badgeLink = `Netlify Next.js runtime v5 test status` + +export default function CopyBadgeButton() { + return ( + + ) +} diff --git a/e2e-report/components/icons.js b/e2e-report/components/icons.js index abed086d70..cd667fa977 100644 --- a/e2e-report/components/icons.js +++ b/e2e-report/components/icons.js @@ -64,3 +64,22 @@ export function GithubIcon({ className }) { ) } + +export function CopyIcon({ className }) { + return ( + + + + ) +}