diff --git a/apps/jsonthing-web/CHANGELOG.md b/apps/jsonthing-web/CHANGELOG.md index 4f48e80..039a83b 100644 --- a/apps/jsonthing-web/CHANGELOG.md +++ b/apps/jsonthing-web/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.5.5](https://github.com/lharti/jsonthing/compare/jsonthing-web@0.5.4...jsonthing-web@0.5.5) (2024-11-14) + + +### Bug Fixes + +* **web:** landing page style ([eaf8bca](https://github.com/lharti/jsonthing/commit/eaf8bca1705f5451c3647fd728f5890e7013475a)) + + + + + ## [0.5.4](https://github.com/lharti/jsonthing/compare/jsonthing-web@0.5.3...jsonthing-web@0.5.4) (2024-11-13) diff --git a/apps/jsonthing-web/package.json b/apps/jsonthing-web/package.json index 0b143fb..4d20ad2 100644 --- a/apps/jsonthing-web/package.json +++ b/apps/jsonthing-web/package.json @@ -1,6 +1,6 @@ { "name": "jsonthing-web", - "version": "0.5.4", + "version": "0.5.5", "private": true, "scripts": { "dev": "next dev --turbo", diff --git a/apps/jsonthing-web/src/components/pages/LandingPage/LandingPage.spec.tsx b/apps/jsonthing-web/src/components/pages/LandingPage/LandingPage.spec.tsx index 926d056..6f5345f 100644 --- a/apps/jsonthing-web/src/components/pages/LandingPage/LandingPage.spec.tsx +++ b/apps/jsonthing-web/src/components/pages/LandingPage/LandingPage.spec.tsx @@ -1,15 +1,32 @@ +import { LandingPageHero } from '@/components/pages/LandingPage/LandingPageHero' import { render } from '@testing-library/react' import React from 'react' -import { LandingPage } from './LandingPage' +import { LandingPage } from '.' -jest.mock('@/components/CreateNewDocButton') +jest.mock('./LandingPageHero') describe('', () => { it('should render', () => { expect.assertions(1) + jest.mocked(LandingPageHero).mockReturnValueOnce('{LANDING_PAGE_HERO}') + const { container } = render() - expect(container).toMatchSnapshot('') + expect(container).toMatchInlineSnapshot(` +
+
+
+ {LANDING_PAGE_HERO} +
+
+
+ `) }) }) diff --git a/apps/jsonthing-web/src/components/pages/LandingPage/LandingPage.tsx b/apps/jsonthing-web/src/components/pages/LandingPage/LandingPage.tsx index 063750f..0a58afb 100644 --- a/apps/jsonthing-web/src/components/pages/LandingPage/LandingPage.tsx +++ b/apps/jsonthing-web/src/components/pages/LandingPage/LandingPage.tsx @@ -1,64 +1,17 @@ -import { CreateNewDocButton } from '@/components/CreateNewDocButton' -import Image from 'next/image' +import { LandingPageHero } from '@/components/pages/LandingPage/LandingPageHero' import React from 'react' export const LandingPage: React.FC = ({}) => { return ( -
-
-
-
- {'jsonthing'} -
- -

- {'JSON storage that speaks API.'} -

- -

- {`Edit, - and access your JSON documents with automatically generated API endpoints.`} -

- - - {'Create new JSON doc'} - -
- -
- jsonthing hero -
+
+
+
) diff --git a/apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/LandingPageHero.spec.tsx b/apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/LandingPageHero.spec.tsx new file mode 100644 index 0000000..4c48361 --- /dev/null +++ b/apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/LandingPageHero.spec.tsx @@ -0,0 +1,20 @@ +import { CreateNewDocButton } from '@/components/CreateNewDocButton' +import { render } from '@testing-library/react' +import React from 'react' +import { LandingPageHero } from '.' + +jest.mock('@/components/CreateNewDocButton') + +describe('', () => { + it('should render', () => { + expect.assertions(1) + + jest.mocked(CreateNewDocButton).mockReturnValueOnce( + , + ) + + const { container } = render() + + expect(container).toMatchSnapshot('') + }) +}) diff --git a/apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/LandingPageHero.tsx b/apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/LandingPageHero.tsx new file mode 100644 index 0000000..f8676fe --- /dev/null +++ b/apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/LandingPageHero.tsx @@ -0,0 +1,96 @@ +import { CreateNewDocButton } from '@/components/CreateNewDocButton' +import { cn } from '@/lib/utils' +import Image from 'next/image' +import Link from 'next/link' +import React from 'react' + +interface PropsWithClassName { + className?: string +} + +const LandingPageLogo: React.FC = ({ className }) => ( + + {'jsonthing'} + +) + +export { LandingPageLogo } + +const LandingPageHeroDetails: React.FC = ({ + className, +}) => { + return ( +
+ + +

+ {'JSON storage that speaks API.'} +

+ +

+ {`Edit, and access your JSON documents with automatically generated API endpoints.`} +

+ + + {'Create new JSON doc'} + +
+ ) +} + +export const LandingPageHero: React.FC = ({ + className, +}) => { + return ( +
+ + + jsonthing hero +
+ ) +} diff --git a/apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/__snapshots__/LandingPageHero.spec.tsx.snap b/apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/__snapshots__/LandingPageHero.spec.tsx.snap new file mode 100644 index 0000000..17ce8a3 --- /dev/null +++ b/apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/__snapshots__/LandingPageHero.spec.tsx.snap @@ -0,0 +1,54 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` should render: 1`] = ` +
+
+
+ + jsonthing + +

+ JSON storage that speaks API. +

+

+ Edit, and access your JSON documents with automatically generated API endpoints. +

+ +
+ jsonthing hero +
+
+`; diff --git a/apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/index.ts b/apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/index.ts new file mode 100644 index 0000000..1fb7967 --- /dev/null +++ b/apps/jsonthing-web/src/components/pages/LandingPage/LandingPageHero/index.ts @@ -0,0 +1 @@ +export { LandingPageHero } from './LandingPageHero' diff --git a/apps/jsonthing-web/src/components/pages/LandingPage/__snapshots__/LandingPage.spec.tsx.snap b/apps/jsonthing-web/src/components/pages/LandingPage/__snapshots__/LandingPage.spec.tsx.snap deleted file mode 100644 index b4d82a4..0000000 --- a/apps/jsonthing-web/src/components/pages/LandingPage/__snapshots__/LandingPage.spec.tsx.snap +++ /dev/null @@ -1,63 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[` should render: 1`] = ` -
-
-
-
-
- jsonthing -
-

- JSON storage that speaks API. -

-

- Edit, - and access your JSON documents with automatically generated API endpoints. -

-
-
- jsonthing hero -
-
-
-
-`;