sendou.ink/app/components/PleaseLogin.tsx
2022-04-16 11:18:13 +03:00

24 lines
558 B
TypeScript

import { useLocation } from "@remix-run/react";
import { getLogInUrl } from "~/utils";
import { Button } from "./Button";
export function PleaseLogin({
texts,
}: {
texts: [beforeButton: string, buttonText: string, afterButton: string];
}) {
const location = useLocation();
return (
<form action={getLogInUrl(location)} method="post">
<p className="button-text-paragraph">
{texts[0]}{" "}
<Button type="submit" variant="minimal">
{texts[1]}
</Button>{" "}
{texts[2]}
</p>
</form>
);
}