diff --git a/.eslintrc.json b/.eslintrc.json index 2bfb18038..d080a31af 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,8 +4,7 @@ "plugin:react/recommended", "plugin:@typescript-eslint/recommended", "prettier/@typescript-eslint", - "plugin:prettier/recommended", - "plugin:mdx/recommended" + "plugin:prettier/recommended" ], "plugins": [ "react", diff --git a/cypress/integration/home_spec.ts b/cypress/integration/home_spec.ts index f086b02e3..a118b9d48 100644 --- a/cypress/integration/home_spec.ts +++ b/cypress/integration/home_spec.ts @@ -14,7 +14,7 @@ describe.skip('Home', () => { }) }) - it('should render overthought', () => { - cy.contains('Overthought').scrollIntoView().should('be.visible') + it('should render writing', () => { + cy.contains('Writing').scrollIntoView().should('be.visible') }) }) diff --git a/cypress/integration/overthought_post_spec.ts b/cypress/integration/overthought_post_spec.ts index 56b6a0d1b..edfadc1e2 100644 --- a/cypress/integration/overthought_post_spec.ts +++ b/cypress/integration/overthought_post_spec.ts @@ -1,23 +1,24 @@ /// /// -describe('Overthought index', () => { +describe('Posts index', () => { it('should render post', () => { - cy.visit('/overthought/adding-dark-mode-with-next-js') - cy.get('[data-cy="overthought-post"]').scrollIntoView().should('be.visible') + cy.visit('/writing/adding-dark-mode-with-next-js') + cy.get('[data-cy="post"]').scrollIntoView().should('be.visible') }) it('should render 404', () => { - cy.visit('/overthought/foobar') + cy.visit('/writing/foobar') cy.wait(1000) - cy.get('[data-cy="overthought-not-found"]') - .scrollIntoView() - .should('be.visible') + cy.get('[data-cy="post-not-found"]').scrollIntoView().should('be.visible') }) it('should render newsletter', () => { - cy.visit('/overthought/adding-dark-mode-with-next-js') - cy.get('[data-cy="overthought-subscribe-box"]') + cy.visit('/writing/adding-dark-mode-with-next-js') + cy.get('[data-cy="writing-feedback-box"]') + .scrollIntoView() + .should('be.visible') + cy.get('[data-cy="writing-subscribe-box"]') .scrollIntoView() .should('be.visible') }) diff --git a/cypress/integration/overthought_spec.ts b/cypress/integration/overthought_spec.ts index 42397ad3e..f68ceb43e 100644 --- a/cypress/integration/overthought_spec.ts +++ b/cypress/integration/overthought_spec.ts @@ -1,17 +1,17 @@ /// /// -describe('Overthought index', () => { +describe('Posts index', () => { before(() => { - cy.visit('/overthought') + cy.visit('/writing') }) it('should render header', () => { - cy.get('[data-cy="overthought"]').scrollIntoView().should('be.visible') + cy.get('[data-cy="writing"]').scrollIntoView().should('be.visible') }) it('should render newsletter', () => { - cy.get('[data-cy="overthought-subscribe-box"]') + cy.get('[data-cy="writing-subscribe-box"]') .scrollIntoView() .should('be.visible') }) diff --git a/next.config.js b/next.config.js index c117b2339..0446a40c8 100644 --- a/next.config.js +++ b/next.config.js @@ -1,12 +1,6 @@ -const path = require('path') -const withMDX = require('@next/mdx')({ - extension: /\.mdx?$/, -}) - -module.exports = withMDX({ - pageExtensions: ['ts', 'tsx', 'mdx'], +module.exports = { images: { - domains: ['pbs.twimg.com'], + domains: ['pbs.twimg.com', 'overthought.ghost.io'], }, env: { FATHOM_SITE_ID: process.env.FATHOM_SITE_ID, @@ -14,4 +8,38 @@ module.exports = withMDX({ GHOST_API_KEY: process.env.GHOST_API_KEY, SIMPLECAST_V2_API_KEY: process.env.SIMPLECAST_V2_API_KEY, }, -}) + async redirects() { + return [ + { + source: '/uses', + destination: '/stack', + permanent: true, + }, + { + source: '/design-details', + destination: '/app-dissection', + permanent: true, + }, + { + source: '/design-details/:slug', + destination: '/app-dissection/:slug', + permanent: true, + }, + { + source: '/journal', + destination: '/writing', + permanent: true, + }, + { + source: '/overthought', + destination: '/writing', + permanent: true, + }, + { + source: '/overthought/:slug', + destination: '/writing/:slug', + permanent: true, + }, + ] + }, +} diff --git a/package.json b/package.json index 941ab1505..82fc947eb 100644 --- a/package.json +++ b/package.json @@ -22,11 +22,6 @@ "@apollo/client": "^3.3.10", "@apollo/link-error": "^2.0.0-beta.3", "@apollo/link-schema": "^2.0.0-beta.3", - "@mdx-js/loader": "^1.6.22", - "@mdx-js/react": "^1.6.22", - "@next/bundle-analyzer": "^10.0.6", - "@next/mdx": "^10.0.6", - "@now/node": "^1.8.5", "@tailwindcss/forms": "^0.2.1", "@tailwindcss/typography": "^0.4.0", "@tippy.js/react": "^3.1.1", @@ -47,15 +42,11 @@ "postmark": "^2.7.1", "prismjs": "^1.23.0", "react": "^17.0.1", - "react-clipboard.js": "^2.0.16", "react-dom": "^17.0.1", "react-feather": "^2.0.9", - "react-flip-move": "^3.0.4", "react-linkify": "^1.0.0-alpha", "react-markdown": "^5.0.3", "react-visibility-sensor": "^5.1.1", - "rebass": "^4.0.7", - "reflexbox": "^4.0.6", "rehype-parse": "^7.0.1", "rehype-remark": "^8.0.0", "remark-preset-lint-recommended": "^5.0.0", @@ -64,9 +55,6 @@ "serve-favicon": "^2.5.0", "string-replace-to-array": "^1.0.3", "styled-components": "^4.4.1", - "terser": "^5.6.0", - "theme-ui": "^0.3.5", - "throttle-debounce": "^3.0.1", "timeago.js": "^4.0.2", "twilio": "^3.57.0", "unified": "^9.2.1", @@ -93,14 +81,14 @@ "autoprefixer": "^10.2.4", "babel-eslint": "^10.1.0", "babel-plugin-styled-components": "^1.12.0", - "cypress": "6.5.0", + "cypress": "^6.6.0", "eslint": "^7.21.0", "eslint-config-prettier": "^7.2.0", "eslint-plugin-cypress": "^2.11.2", "eslint-plugin-mdx": "^1.9.0", "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-react": "^7.22.0", - "husky": "^5.1.2", + "husky": "^5.1.3", "lint-staged": "^10.5.4", "now-env": "^3.2.0", "postcss": "^8.2.5", @@ -123,4 +111,4 @@ }, "pre-commit": "lint:staged && generate", "license": "MIT" -} +} \ No newline at end of file diff --git a/public/static/fonts/iAWriterQuattroS-Bold.woff b/public/static/fonts/iAWriterQuattroS-Bold.woff new file mode 100644 index 000000000..053e11d9a Binary files /dev/null and b/public/static/fonts/iAWriterQuattroS-Bold.woff differ diff --git a/public/static/fonts/iAWriterQuattroS-Bold.woff2 b/public/static/fonts/iAWriterQuattroS-Bold.woff2 new file mode 100644 index 000000000..d4c3f631f Binary files /dev/null and b/public/static/fonts/iAWriterQuattroS-Bold.woff2 differ diff --git a/public/static/fonts/iAWriterQuattroS-BoldItalic.woff b/public/static/fonts/iAWriterQuattroS-BoldItalic.woff new file mode 100644 index 000000000..90857aadd Binary files /dev/null and b/public/static/fonts/iAWriterQuattroS-BoldItalic.woff differ diff --git a/public/static/fonts/iAWriterQuattroS-BoldItalic.woff2 b/public/static/fonts/iAWriterQuattroS-BoldItalic.woff2 new file mode 100644 index 000000000..fb9324dc4 Binary files /dev/null and b/public/static/fonts/iAWriterQuattroS-BoldItalic.woff2 differ diff --git a/public/static/fonts/iAWriterQuattroS-Italic.woff b/public/static/fonts/iAWriterQuattroS-Italic.woff new file mode 100644 index 000000000..9c53e1a1b Binary files /dev/null and b/public/static/fonts/iAWriterQuattroS-Italic.woff differ diff --git a/public/static/fonts/iAWriterQuattroS-Italic.woff2 b/public/static/fonts/iAWriterQuattroS-Italic.woff2 new file mode 100644 index 000000000..ae1630c22 Binary files /dev/null and b/public/static/fonts/iAWriterQuattroS-Italic.woff2 differ diff --git a/public/static/fonts/iAWriterQuattroS-Regular.woff b/public/static/fonts/iAWriterQuattroS-Regular.woff new file mode 100644 index 000000000..87c5b87a2 Binary files /dev/null and b/public/static/fonts/iAWriterQuattroS-Regular.woff differ diff --git a/public/static/fonts/iAWriterQuattroS-Regular.woff2 b/public/static/fonts/iAWriterQuattroS-Regular.woff2 new file mode 100644 index 000000000..a25cdbcdd Binary files /dev/null and b/public/static/fonts/iAWriterQuattroS-Regular.woff2 differ diff --git a/public/static/fonts/iAWriterQuattroV-Italic.ttf b/public/static/fonts/iAWriterQuattroV-Italic.ttf new file mode 100644 index 000000000..b855d8ef3 Binary files /dev/null and b/public/static/fonts/iAWriterQuattroV-Italic.ttf differ diff --git a/public/static/fonts/iAWriterQuattroV.ttf b/public/static/fonts/iAWriterQuattroV.ttf new file mode 100644 index 000000000..6d50c1419 Binary files /dev/null and b/public/static/fonts/iAWriterQuattroV.ttf differ diff --git a/public/static/img/subscription_icons/breaker.png b/public/static/img/subscription_icons/breaker.png deleted file mode 100755 index e829ab17e..000000000 Binary files a/public/static/img/subscription_icons/breaker.png and /dev/null differ diff --git a/public/static/img/subscription_icons/castro.png b/public/static/img/subscription_icons/castro.png deleted file mode 100755 index d789f0c6a..000000000 Binary files a/public/static/img/subscription_icons/castro.png and /dev/null differ diff --git a/public/static/img/subscription_icons/google-podcasts.png b/public/static/img/subscription_icons/google-podcasts.png deleted file mode 100755 index 7bdde75b5..000000000 Binary files a/public/static/img/subscription_icons/google-podcasts.png and /dev/null differ diff --git a/public/static/img/subscription_icons/overcast.png b/public/static/img/subscription_icons/overcast.png deleted file mode 100755 index 933ed7457..000000000 Binary files a/public/static/img/subscription_icons/overcast.png and /dev/null differ diff --git a/public/static/img/subscription_icons/pocketcasts.png b/public/static/img/subscription_icons/pocketcasts.png deleted file mode 100755 index 9d81005ba..000000000 Binary files a/public/static/img/subscription_icons/pocketcasts.png and /dev/null differ diff --git a/public/static/img/subscription_icons/podcasts.png b/public/static/img/subscription_icons/podcasts.png deleted file mode 100755 index f587d303f..000000000 Binary files a/public/static/img/subscription_icons/podcasts.png and /dev/null differ diff --git a/public/static/img/subscription_icons/rss.png b/public/static/img/subscription_icons/rss.png deleted file mode 100755 index c20078fd0..000000000 Binary files a/public/static/img/subscription_icons/rss.png and /dev/null differ diff --git a/public/static/img/subscription_icons/spotify.png b/public/static/img/subscription_icons/spotify.png deleted file mode 100644 index c23b83f59..000000000 Binary files a/public/static/img/subscription_icons/spotify.png and /dev/null differ diff --git a/src/components/AMAQuestions/AskQuestion.tsx b/src/components/AMAQuestions/AskQuestion.tsx index 415bc63bf..4fdd66f0b 100644 --- a/src/components/AMAQuestions/AskQuestion.tsx +++ b/src/components/AMAQuestions/AskQuestion.tsx @@ -1,6 +1,8 @@ import * as React from 'react' import { useAddAmaQuestionMutation } from '~/graphql/types.generated' import { Textarea } from '~/components/Input' +import { ErrorAlert, SuccessAlert } from '../Alert' +import Button from '../Button' export default function AddBookmark() { const [question, setQuestion] = React.useState('') @@ -37,7 +39,7 @@ export default function AddBookmark() { } return ( -
+