forked from pmndrs/jotai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(website): add support menu (pmndrs#1415)
* feat(website): add support menu * fix(website): fix import * fix(website): revise input * fix(website): remove deprecated flags
- Loading branch information
Showing
16 changed files
with
1,118 additions
and
1,642 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
.cache | ||
package.json | ||
package-lock.json | ||
yarn.lock | ||
public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,46 +6,51 @@ | |
"bugs": "https://github.com/pmndrs/jotai/issues", | ||
"license": "MIT", | ||
"author": "Sophia Michelle Andren <[email protected]> (https://candycode.com/)", | ||
"sideEffects": [ | ||
"*.css" | ||
], | ||
"scripts": { | ||
"dev": "gatsby develop", | ||
"build": "gatsby build", | ||
"serve": "gatsby serve", | ||
"clean": "gatsby clean", | ||
"deduplicate": "npx yarn-deduplicate yarn.lock", | ||
"postdeduplicate": "yarn install" | ||
"postdeduplicate": "yarn install", | ||
"browserslist": "npx browserslist@latest --update-db" | ||
}, | ||
"dependencies": { | ||
"@mdx-js/mdx": "^1.6.22", | ||
"@mdx-js/react": "^1.6.22", | ||
"@radix-ui/react-dialog": "^0.1.5", | ||
"@radix-ui/react-dialog": "^1.0.0", | ||
"algoliasearch": "^4.13.1", | ||
"classnames": "^2.3.1", | ||
"gatsby": "^4.17.0", | ||
"gatsby": "^4.22.1", | ||
"gatsby-plugin-algolia": "^0.26.0", | ||
"gatsby-plugin-google-gtag": "^4.17.0", | ||
"gatsby-plugin-google-gtag": "^4.22.0", | ||
"gatsby-plugin-mdx": "^3.17.0", | ||
"gatsby-plugin-postcss": "^5.17.0", | ||
"gatsby-plugin-sitemap": "^5.17.0", | ||
"gatsby-plugin-postcss": "^5.22.0", | ||
"gatsby-plugin-sitemap": "^5.22.0", | ||
"gatsby-plugin-use-dark-mode": "^1.5.0", | ||
"gatsby-source-filesystem": "^4.17.0", | ||
"jotai": "^1.7.0", | ||
"just-kebab-case": "^4.0.3", | ||
"just-throttle": "^4.0.1", | ||
"gatsby-source-filesystem": "^4.22.0", | ||
"jotai": "^1.8.3", | ||
"just-kebab-case": "^4.1.1", | ||
"just-throttle": "^4.1.1", | ||
"prism-react-renderer": "^1.3.3", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-instantsearch-hooks-web": "^6.30.2", | ||
"react-instantsearch-hooks-web": "^6.32.1", | ||
"use-dark-mode": "^2.3.1" | ||
}, | ||
"devDependencies": { | ||
"@tailwindcss/forms": "^0.5.2", | ||
"autoprefixer": "^10.4.7", | ||
"babel-preset-gatsby": "^2.17.0", | ||
"postcss": "^8.4.14", | ||
"postcss-import": "^14.1.0", | ||
"@tailwindcss/forms": "^0.5.3", | ||
"autoprefixer": "^10.4.9", | ||
"babel-preset-gatsby": "^2.22.1", | ||
"postcss": "^8.4.16", | ||
"postcss-import": "^15.0.0", | ||
"postmark": "^3.0.14", | ||
"prettier": "^2.7.1", | ||
"prettier-plugin-tailwindcss": "^0.1.11", | ||
"tailwindcss": "^3.1.4" | ||
"tailwindcss": "^3.1.8" | ||
}, | ||
"private": true, | ||
"browserslist": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import * as postmark from 'postmark'; | ||
|
||
const client = new postmark.ServerClient(process.env.POSTMARK_API_TOKEN); | ||
|
||
export default async function handler(request, response) { | ||
const body = request.body; | ||
|
||
if (!body.name || !body.email || !body.message) { | ||
return response.status(400).json({ data: 'Invalid' }); | ||
} | ||
|
||
const subject = `Message from ${body.name} (${body.email}) via jotai.org`; | ||
|
||
const message = ` | ||
Name: ${body.name}\r\n | ||
Email: ${body.email}\r\n | ||
Message: ${body.message} | ||
`; | ||
|
||
try { | ||
client.sendEmail({ | ||
From: '[email protected]', | ||
To: process.env.EMAIL_RECIPIENTS, | ||
Subject: subject, | ||
ReplyTo: body.email, | ||
TextBody: message, | ||
}); | ||
|
||
response.status(200).json({ status: 'Sent' }); | ||
} catch (error) { | ||
response.status(500).json({ status: 'Not sent' }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { useAtom } from 'jotai'; | ||
import { helpAtom } from '../atoms'; | ||
import { Modal, Support } from '../components'; | ||
|
||
export const SupportModal = () => { | ||
const [showHelp, setShowHelp] = useAtom(helpAtom); | ||
|
||
return ( | ||
<Modal isOpen={showHelp} onOpenChange={setShowHelp}> | ||
<div className="rounded-xl bg-gray-100 p-4 text-sm leading-snug text-gray-700 dark:bg-gray-900 dark:text-gray-300 sm:text-base md:text-lg lg:gap-8 lg:p-8 lg:leading-normal"> | ||
<Support /> | ||
</div> | ||
</Modal> | ||
); | ||
}; |
Oops, something went wrong.