Skip to content

Commit

Permalink
chore: cleaning up file name casing (class names upper case)
Browse files Browse the repository at this point in the history
  • Loading branch information
activescott committed Dec 25, 2020
1 parent 0521e7f commit 1f4914a
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/react-app/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react"
import { render } from "@testing-library/react"
import App from "./App"

test("renders Welcome to our home", () => {
test("renders default route (Home)", () => {
const { getByText } = render(<App />)
const elem = getByText(/Welcome to our home./i)
expect(elem).toBeInTheDocument()
Expand Down
10 changes: 5 additions & 5 deletions src/react-app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from "react"
import { BrowserRouter as Router, Switch, Route } from "react-router-dom"

import Home from "./pages/home"
import About from "./pages/about"
import Data from "./pages/data"
import Privacy from "./pages/policy/privacy"
import Terms from "./pages/policy/terms"
import Home from "./pages/Home"
import About from "./pages/About"
import Data from "./pages/Data"
import Privacy from "./pages/policy/Privacy"
import Terms from "./pages/policy/Terms"

// This site has 3 pages, all of which are rendered
// dynamically in the browser (not server rendered).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react"
import PolicyNav from "./policyNav"
import PolicyNav from "./PolicyNav"

const Foot = (): JSX.Element => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from "react"
import Nav from "./nav"
import Nav from "./Nav"
import "../style/style.scss"
import { useScriptInline } from "../lib/useScript"
import CookieConsent from "./cookieConsent"
import Foot from "./foot"
import CookieConsent from "./CookieConsent"
import Foot from "./Foot"
import { Helmet } from "react-helmet"

// https://nextjs.org/learn/basics/using-shared-components/rendering-children-components
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react"
import Layout from "./layout"
import Layout from "./Layout"

interface Props {
sidebar: React.ReactNode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Nav = (): JSX.Element => {
<a href={href}>{label}</a>
) : (
<Link to={href} className="nav-link">
{label}
{label}
</Link>
)}
</li>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react"
import Layout from "../components/layout"
import Layout from "../components/Layout"
import { Helmet } from "react-helmet"

const Page = (): JSX.Element => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react"
import Layout from "../components/layout"
import Layout from "../components/Layout"
import { Helmet } from "react-helmet"
import { useApiGet } from "../lib/useApiHooks"

Expand Down
14 changes: 14 additions & 0 deletions src/react-app/src/pages/Home.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react"
import { render } from "@testing-library/react"
import Home from "./Home"
import { MemoryRouter } from "react-router-dom"

test("renders Welcome to our home", () => {
const { getByText } = render(
<MemoryRouter>
<Home />
</MemoryRouter>
)
const elem = getByText(/Welcome to our home./i)
expect(elem).toBeInTheDocument()
})
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react"
import Layout from "../components/layout"
import Layout from "../components/Layout"
import { Helmet } from "react-helmet"

const Page = (): JSX.Element => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react"
import { Helmet } from "react-helmet"
import LayoutWithSidebar from "../../components/layoutWithSidebar"
import PolicyNav from "../../components/policyNav"
import LayoutWithSidebar from "../../components/LayoutWithSidebar"
import PolicyNav from "../../components/PolicyNav"

const Page = (): JSX.Element => (
<>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react"
import { Helmet } from "react-helmet"
import LayoutWithSidebar from "../../components/layoutWithSidebar"
import PolicyNav from "../../components/policyNav"
import LayoutWithSidebar from "../../components/LayoutWithSidebar"
import PolicyNav from "../../components/PolicyNav"

const Page = (): JSX.Element => (
<>
Expand Down

0 comments on commit 1f4914a

Please sign in to comment.