-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
107 additions
and
33 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
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
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
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,5 @@ | ||
WS_URL="wss://realtime.courier.com/production" | ||
API_URL="https://api.courier.com/client/q" | ||
INBOX_API_URL="https://inbox.courier.com/q" | ||
CLIENT_KEY="ZDJmNTVhMWQtYmZjMS00ODg0LThhMjQtZDg0ZDg5ZTlhN2Ri" | ||
USER_ID="70f6a4f4-2907-4518-b8f3-b9cfab224764" |
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,5 @@ | ||
WS_URL="wss://20en15n3ng.execute-api.us-east-1.amazonaws.com/dev" | ||
API_URL= "https://rubmz24skk.execute-api.us-east-1.amazonaws.com/dev/client/q" | ||
INBOX_API_URL="https://3rjq5oe9b1.execute-api.us-east-1.amazonaws.com/dev/q" | ||
CLIENT_KEY="ZDJmNTVhMWQtYmZjMS00ODg0LThhMjQtZDg0ZDg5ZTlhN2Ri" | ||
USER_ID="70f6a4f4-2907-4518-b8f3-b9cfab224764" |
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,64 @@ | ||
import React from "react"; | ||
import ReactMarkdown from "react-markdown"; | ||
|
||
import { Inbox } from "@trycourier/react-inbox"; | ||
import { CourierProvider } from "@trycourier/react-provider"; | ||
import rehypeRaw from "rehype-raw"; | ||
|
||
import readmeMd from "@trycourier/react-inbox/README.md"; | ||
|
||
// @ts-ignore | ||
|
||
const API_URL = process.env.API_URL || ""; | ||
const CLIENT_KEY = process.env.CLIENT_KEY || ""; | ||
const USER_ID = process.env.USER_ID || ""; | ||
|
||
export default { | ||
title: "Inbox", | ||
}; | ||
|
||
export const ReadMe = () => { | ||
return <ReactMarkdown rehypePlugins={[rehypeRaw]}>{readmeMd}</ReactMarkdown>; | ||
}; | ||
|
||
export const ArchivedExample = () => { | ||
return ( | ||
<div | ||
style={{ | ||
display: "flex", | ||
alignItems: "top", | ||
justifyContent: "space-between", | ||
}} | ||
> | ||
<div> | ||
<ReactMarkdown>{`## Archived Example`}</ReactMarkdown> | ||
<ReactMarkdown>{` | ||
\`\`\` | ||
<Inbox | ||
views={[ | ||
{ label: "Notifications", id: "messages" }, | ||
{ label: "Archived", params: { archived: true }, id: "archived" }, | ||
]} | ||
/> | ||
\`\`\``}</ReactMarkdown> | ||
</div> | ||
<div> | ||
<CourierProvider | ||
// applyMiddleware={(defaultMiddleware) => [ | ||
// mockMiddleware, | ||
// ...defaultMiddleware, | ||
// ]} | ||
clientKey={CLIENT_KEY} | ||
userId={USER_ID} | ||
> | ||
<Inbox | ||
views={[ | ||
{ label: "Notifications", id: "messages" }, | ||
{ label: "Archived", params: { archived: true }, id: "archived" }, | ||
]} | ||
/> | ||
</CourierProvider> | ||
</div> | ||
</div> | ||
); | ||
}; |
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