shellphone.app/app/routes/__app/settings/notifications.tsx

37 lines
1.1 KiB
TypeScript
Raw Normal View History

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
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";
import notifyIncomingMessageQueue from "~/queues/notify-incoming-message.server";
export const action: ActionFunction = async () => {
await notifyIncomingMessageQueue.add("ddd", {
messageSid: "SM07ef9eb508f4e04bff596f11ac90e835",
phoneNumberId: "PNb77c9690c394368bdbaf20ea6fe5e9fc",
});
return null;
};
2022-06-01 20:45:49 +00:00
export default function Notifications() {
2022-05-14 10:22:06 +00:00
return (
<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>
<section>
2022-06-01 21:56:37 +00:00
<Form method="post">
<Button variant="default" type="submit">
send it!!!
</Button>
</Form>
</section>
</section>
2022-05-14 10:22:06 +00:00
);
}