feat(storefront): update FAQ and legal documentation

- Added new FAQ sections for account security, ordering and checkout, returns, shipping, and contact information.
- Introduced legal documents including privacy policy, terms of service, data protection, and general terms and conditions.
- Updated package dependencies to include gray-matter and remark-gfm for enhanced markdown support.
This commit is contained in:
2026-03-13 21:39:25 +03:00
parent f1dbf0b6ee
commit c8f5d8d096
52 changed files with 2273 additions and 261 deletions

32
convex/messages.ts Normal file
View File

@@ -0,0 +1,32 @@
import { mutation } from "./_generated/server";
import { v } from "convex/values";
const topicValidator = v.union(
v.literal("products"),
v.literal("orders"),
v.literal("support"),
v.literal("other"),
);
/**
* Public mutation: submit a contact message. No auth required.
*/
export const submit = mutation({
args: {
fullName: v.string(),
email: v.string(),
topic: topicValidator,
message: v.string(),
},
handler: async (ctx, args) => {
const now = Date.now();
return await ctx.db.insert("messages", {
fullName: args.fullName,
email: args.email,
topic: args.topic,
message: args.message,
createdAt: now,
bookmarked: false,
});
},
});