mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-08 12:07:28 +02:00
🐛 Hide feedback toggle on self-hosted instances and use correct from address
This commit is contained in:
parent
2a88b8d610
commit
bb0a58ca12
2 changed files with 9 additions and 1 deletions
|
@ -24,11 +24,16 @@ import { useForm } from "react-hook-form";
|
|||
|
||||
import { Trans } from "@/components/trans";
|
||||
|
||||
import { isSelfHosted } from "@/utils/constants";
|
||||
import { submitFeedback } from "../actions";
|
||||
import type { Feedback } from "../schema";
|
||||
import { feedbackSchema } from "../schema";
|
||||
|
||||
export function FeedbackToggle() {
|
||||
if (isSelfHosted) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const form = useForm<Feedback>({
|
||||
resolver: zodResolver(feedbackSchema),
|
||||
});
|
||||
|
|
|
@ -140,7 +140,10 @@ export class EmailClient {
|
|||
}
|
||||
|
||||
try {
|
||||
await this.transport.sendMail(options);
|
||||
await this.transport.sendMail({
|
||||
...options,
|
||||
from: options.from || this.config.mail.from,
|
||||
});
|
||||
return;
|
||||
} catch (e) {
|
||||
console.error("Error sending email", e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue