From 577271876a6cf30d59085ec98d903c526db77447 Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Wed, 2 Feb 2022 07:48:36 -0600 Subject: [PATCH 1/2] :recycle: rename Stats1 to Stats.jsx [sc-715] --- components/Sections/{Stats1.jsx => Stats.jsx} | 2 +- pages/index.jsx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename components/Sections/{Stats1.jsx => Stats.jsx} (90%) diff --git a/components/Sections/Stats1.jsx b/components/Sections/Stats.jsx similarity index 90% rename from components/Sections/Stats1.jsx rename to components/Sections/Stats.jsx index fee61cc..4fa1bc9 100644 --- a/components/Sections/Stats1.jsx +++ b/components/Sections/Stats.jsx @@ -1,6 +1,6 @@ import StatNumberCard from "../StatNumberCard"; -export default function Stats1({ data }) { +export default function Stats({ data }) { return (
diff --git a/pages/index.jsx b/pages/index.jsx index b1084c8..e42043b 100644 --- a/pages/index.jsx +++ b/pages/index.jsx @@ -1,6 +1,6 @@ -import { useState, useRef, useEffect } from "react"; +import { useState, useEffect } from "react"; import { fetcher, clientJwtDecode } from "../lib/utils"; -import { useSession, signIn, signOut } from "next-auth/react"; +import { useSession } from "next-auth/react"; import { routeSeoContent } from "../siteMetadata.js"; import localforage from "localforage"; import { NextSeo } from "next-seo"; @@ -10,7 +10,7 @@ import Footer from "../components/Footer"; import NavigationHero from "../components/Sections/NavigationHero"; import WhyInvest from "../components/Sections/WhyInvest"; import FactCards from "../components/Sections/FactCards"; -import Stats1 from "../components/Sections/Stats1"; +import Stats from "../components/Sections/Stats"; import FactSnippets from "../components/Sections/FactSnippets"; import InfoBlock from "../components/Sections/InfoBlock"; import Team from "../components/Sections/Team"; @@ -163,12 +163,12 @@ export default function Funded() { mobileMenuIsClicked={mobileMenuIsClicked} setMobileMenuIsClicked={setMobileMenuIsClicked} /> - + {!session ? null : ( <> - + Date: Wed, 2 Feb 2022 07:48:40 -0600 Subject: [PATCH 2/2] :recycle: :white_check_mark: update for Stats rename + add data prop component test [sc-715] --- __tests__/components/Sections/Stats1.test.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/__tests__/components/Sections/Stats1.test.jsx b/__tests__/components/Sections/Stats1.test.jsx index b8ed9c9..8e1a81b 100644 --- a/__tests__/components/Sections/Stats1.test.jsx +++ b/__tests__/components/Sections/Stats1.test.jsx @@ -1,8 +1,12 @@ import { render } from "@testing-library/react"; -import Stats1 from "../../../components/Sections/Stats1"; +import Stats from "../../../components/Sections/Stats"; +import { stats1Data } from "../../../cms.data"; -describe("Stats1", () => { +describe("Stats component tests", () => { it("should render the component", () => { - render(); + render(); + }); + it("should render the component with data", () => { + render(); }); });