2022-05-30 00:21:42 +00:00
|
|
|
import type { ActionFunction } from "@remix-run/node";
|
|
|
|
import { ClientOnly } from "remix-utils";
|
|
|
|
import { Form } from "@remix-run/react";
|
2022-06-01 20:45:49 +00:00
|
|
|
|
2022-05-30 00:21:42 +00:00
|
|
|
import Button from "~/features/settings/components/button";
|
2022-06-01 20:45:49 +00:00
|
|
|
import NotificationsSettings, {
|
|
|
|
FallbackNotificationsSettings,
|
|
|
|
} from "~/features/settings/components/settings/notifications-settings";
|
2022-06-19 15:57:51 +00:00
|
|
|
import notifyIncomingMessageQueue from "~/queues/notify-incoming-message.server";
|
2022-05-30 00:21:42 +00:00
|
|
|
|
|
|
|
export const action: ActionFunction = async () => {
|
2022-06-19 15:57:51 +00:00
|
|
|
await notifyIncomingMessageQueue.add("ddd", {
|
|
|
|
messageSid: "SM07ef9eb508f4e04bff596f11ac90e835",
|
|
|
|
phoneNumberId: "PNb77c9690c394368bdbaf20ea6fe5e9fc",
|
2022-05-30 00:21:42 +00:00
|
|
|
});
|
|
|
|
return null;
|
|
|
|
};
|
|
|
|
|
2022-06-01 20:45:49 +00:00
|
|
|
export default function Notifications() {
|
2022-05-14 10:22:06 +00:00
|
|
|
return (
|
2022-05-30 00:21:42 +00:00
|
|
|
<section className="pt-6 divide-y divide-gray-200">
|
2022-06-01 20:45:49 +00:00
|
|
|
<div className="px-4 sm:px-6">
|
|
|
|
<h2 className="text-lg leading-6 font-medium text-gray-900">Notifications</h2>
|
|
|
|
<ClientOnly fallback={<FallbackNotificationsSettings />}>{() => <NotificationsSettings />}</ClientOnly>
|
|
|
|
</div>
|
|
|
|
|
2022-05-30 00:21:42 +00:00
|
|
|
<section>
|
2022-06-01 21:56:37 +00:00
|
|
|
<Form method="post">
|
2022-05-30 00:21:42 +00:00
|
|
|
<Button variant="default" type="submit">
|
|
|
|
send it!!!
|
|
|
|
</Button>
|
|
|
|
</Form>
|
|
|
|
</section>
|
|
|
|
</section>
|
2022-05-14 10:22:06 +00:00
|
|
|
);
|
|
|
|
}
|