You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,23 @@
1
-
# Example NextJS Advanced Contact Form
1
+
# Example NextJS Floating Contact Form
2
2
3
3
This NextJS app shows how to build a floating support bubble using Plain's [Custom Timeline Entries](https://docs.plain.com/recipes/custom-timeline-entry-upsert) and [Typescript SDK](https://www.npmjs.com/package/@team-plain/typescript-sdk).
4
4
5
-
Using this contact form customers can easily get in touch with you
5
+
Using this contact form customers can easily get in touch with you, or jump to your discord community or docs.
6
6
7
7
This example mainly consists of one [Next.js API Route](https://nextjs.org/docs/api-routes/introduction) (`/api/contact-form.tsx`) which calls the Plain API to:
8
8
9
9
- Create the customer within Plain if they don't exist
10
10
- Create a Custom Timeline Entry with the contents of the contact form
11
11
12
-
You can see what it looks like here https://TODO.vercel.app/ but you will need to run this example yourself if you want to see what it looks like within Plain as someone providing support.
12
+
You can see what it looks like here https://example-nextjs-floating-form.vercel.app/ but you will need to run this example yourself if you want to see what it looks like within Plain as someone providing support.
13
13
14
14
This is meant as a starting point that you can customise to specifically fit your product and needs.
15
15
16
+

17
+
16
18
### Interesting files:
17
19
18
-
- The API route: [./pages/api/contact-form.ts](./pages/api/contact-form.ts)
20
+
- The API route: [./pages/api/contact-form.ts](./pages/api/contact-form.ts)
19
21
- The contact form react component: [./src/components/contactForm.tsx](./src/components/contactForm.tsx)
0 commit comments