Skip to content

Commit 96a17f5

Browse files
committed
Update
1 parent f8f90fd commit 96a17f5

File tree

4 files changed

+42
-29
lines changed

4 files changed

+42
-29
lines changed

apps/dashboard/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"react-markdown": "^9.0.1",
9090
"react-responsive-carousel": "^3.2.23",
9191
"react-table": "^7.8.0",
92+
"react-turnstile": "^1.1.4",
9293
"recharts": "^2.13.0",
9394
"remark-gfm": "^4.0.0",
9495
"server-only": "^0.0.1",

apps/dashboard/src/app/(dashboard)/support/components/create-ticket.action.ts

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,16 @@ function prepareEmailTitle(
3636
return title;
3737
}
3838

39-
function prepareEmailBody(
40-
product: string,
41-
markdownInput: string,
42-
email: string,
43-
address: string,
44-
extraInfoInput: Record<string, string>,
45-
) {
39+
function prepareEmailBody(props: {
40+
product: string;
41+
markdownInput: string;
42+
email: string;
43+
name: string;
44+
extraInfoInput: Record<string, string>;
45+
walletAddress: string;
46+
}) {
47+
const { extraInfoInput, email, walletAddress, product, name, markdownInput } =
48+
props;
4649
// Update `markdown` to include the infos from the form
4750
const extraInfo = Object.keys(extraInfoInput)
4851
.filter((key) => key.startsWith("extraInfo_"))
@@ -54,7 +57,8 @@ function prepareEmailBody(
5457
})
5558
.join("");
5659
const markdown = `# Email: ${email}
57-
# Address: ${address}
60+
# Name: ${name}
61+
# Wallet address: ${walletAddress}
5862
# Product: ${product}
5963
${extraInfo}
6064
# Message:
@@ -110,13 +114,14 @@ export async function createTicketAction(
110114
keyVal[key] = formData.get(key)?.toString() || "";
111115
}
112116

113-
const markdown = prepareEmailBody(
117+
const markdown = prepareEmailBody({
114118
product,
115-
keyVal.markdown,
116-
account.data.email,
117-
account.data.name,
118-
keyVal,
119-
);
119+
markdownInput: keyVal.markdown,
120+
email: account.data.email,
121+
name: account.data.name,
122+
extraInfoInput: keyVal,
123+
walletAddress: activeAccount,
124+
});
120125

121126
const content = {
122127
type: "email",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { describe } from "vitest";
2+
3+
describe("ERC721 claimTo", () => {});

pnpm-lock.yaml

Lines changed: 19 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)