From e08b3d2139c97c882aa643596b04554e02bddb39 Mon Sep 17 00:00:00 2001 From: ctbw Date: Sat, 2 Mar 2024 16:39:02 -0600 Subject: [PATCH 1/2] adds subscription confirmation page --- ...cribe.tsx => SubscriptionConfirmation.tsx} | 6 ++- package.json | 1 + pages/subscribe.tsx | 3 -- pages/subscription-confirmation.tsx | 3 ++ pnpm-lock.yaml | 43 +++++++++++++++++++ site.config.ts | 7 ++- 6 files changed, 57 insertions(+), 6 deletions(-) rename components/{Subscribe.tsx => SubscriptionConfirmation.tsx} (69%) delete mode 100644 pages/subscribe.tsx create mode 100644 pages/subscription-confirmation.tsx diff --git a/components/Subscribe.tsx b/components/SubscriptionConfirmation.tsx similarity index 69% rename from components/Subscribe.tsx rename to components/SubscriptionConfirmation.tsx index 1dda754..0ffc613 100644 --- a/components/Subscribe.tsx +++ b/components/SubscriptionConfirmation.tsx @@ -6,7 +6,9 @@ import { PageHead } from './PageHead' import styles from './styles.module.css' -export const Subscribe: React.FC = ({ site }) => { +export const SubscriptionConfirmation: React.FC = ({ + site +}) => { const title = site?.name || 'Subscribe' return ( @@ -15,7 +17,7 @@ export const Subscribe: React.FC = ({ site }) => {
-

Subscribe To The Blog!

+

You are subscribed!

diff --git a/package.json b/package.json index 9120e47..a8390a3 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "react": "^18.2.0", "react-body-classname": "^1.3.1", "react-dom": "^18.2.0", + "react-mailchimp-subscribe": "^2.1.3", "react-notion-x": "^6.15.6", "react-tweet-embed": "^2.0.0", "react-use": "^17.4.2", diff --git a/pages/subscribe.tsx b/pages/subscribe.tsx deleted file mode 100644 index 27b05a7..0000000 --- a/pages/subscribe.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import { Subscribe } from '@/components/Subscribe' - -export default Subscribe diff --git a/pages/subscription-confirmation.tsx b/pages/subscription-confirmation.tsx new file mode 100644 index 0000000..21938a7 --- /dev/null +++ b/pages/subscription-confirmation.tsx @@ -0,0 +1,3 @@ +import { SubscriptionConfirmation } from '@/components/SubscriptionConfirmation' + +export default SubscriptionConfirmation diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 354b120..faa8bb5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -77,6 +77,9 @@ dependencies: react-dom: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) + react-mailchimp-subscribe: + specifier: ^2.1.3 + version: 2.1.3(react@18.2.0) react-notion-x: specifier: ^6.15.6 version: 6.16.0(@babel/runtime@7.23.9)(@types/react@18.2.58)(react-dom@18.2.0)(react@18.2.0)(webpack@5.90.3) @@ -1907,6 +1910,17 @@ packages: '@babel/runtime': 7.23.9 dev: false + /debug@2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.0.0 + dev: false + /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -3208,6 +3222,14 @@ packages: resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==} dev: false + /jsonp@0.2.1: + resolution: {integrity: sha512-pfog5gdDxPdV4eP7Kg87M8/bHgshlZ5pybl+yKxAnCZ5O7lCIn7Ixydj03wOlnDQesky2BPyA91SQ+5Y/mNwzw==} + dependencies: + debug: 2.6.9 + transitivePeerDependencies: + - supports-color + dev: false + /jsx-ast-utils@3.3.5: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} @@ -3553,6 +3575,10 @@ packages: engines: {node: '>=10'} dev: true + /ms@2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + dev: false + /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -4273,6 +4299,19 @@ packages: resolution: {integrity: sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==} dev: false + /react-mailchimp-subscribe@2.1.3(react@18.2.0): + resolution: {integrity: sha512-ZRuPZMnX/9pHQLnAQavsgB5xIF+gNqjNCCq1vvTs23cn+93W2oOp17qjg3LpDBEt1HJi6IHXMwpKXn0taY8FHw==} + peerDependencies: + react: '>=15' + dependencies: + jsonp: 0.2.1 + prop-types: 15.8.1 + react: 18.2.0 + to-querystring: 1.2.0 + transitivePeerDependencies: + - supports-color + dev: false + /react-modal@3.16.1(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg==} engines: {node: '>=8'} @@ -5133,6 +5172,10 @@ packages: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} + /to-querystring@1.2.0: + resolution: {integrity: sha512-V4qvlRNOltdNxvWGuDS71sNMH6FtFNx3GP967WT8gb6xzi4thJTUfogIln9hvz1ZmWcm9hY35LklMexo0YVHdg==} + dev: false + /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} diff --git a/site.config.ts b/site.config.ts index 36d9962..8f5b2bd 100644 --- a/site.config.ts +++ b/site.config.ts @@ -51,5 +51,10 @@ export default siteConfig({ // important pages. To use `navigationLinks`, set `navigationStyle` to `custom`. // navigationStyle: 'default' navigationStyle: 'custom', - navigationLinks: [] + navigationLinks: [ + { + title: 'Subscribe', + pageId: 'f55931fc01134c97a32ca4f0104f6cf0' + } + ] }) From 8ebf7bb49edc47e36994a2d084c8358b71d1a83c Mon Sep 17 00:00:00 2001 From: ctbw Date: Sat, 2 Mar 2024 16:40:34 -0600 Subject: [PATCH 2/2] removes react mail chimp package --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index a8390a3..9120e47 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,6 @@ "react": "^18.2.0", "react-body-classname": "^1.3.1", "react-dom": "^18.2.0", - "react-mailchimp-subscribe": "^2.1.3", "react-notion-x": "^6.15.6", "react-tweet-embed": "^2.0.0", "react-use": "^17.4.2",