Added checkbox for accepted terms

This commit is contained in:
Joao Ramos
2024-02-12 21:45:37 +00:00
parent 4802310474
commit 17ec004a59
3 changed files with 44 additions and 3 deletions

View File

@@ -0,0 +1,32 @@
import React from "react";
import Link from "next/link";
import Checkbox from "@/components/Low/Checkbox";
const useAcceptedTerms = () => {
const [acceptedTerms, setAcceptedTerms] = React.useState(false);
const renderCheckbox = () => (
<Checkbox isChecked={acceptedTerms} onChange={setAcceptedTerms}>
I agree to the
<Link
href={`${process.env.NEXT_PUBLIC_WEBSITE_URL}/terms`}
className="text-blue-500"
>
{" "}
Terms and Conditions
</Link>{" "}
and
<Link
href={`${process.env.NEXT_PUBLIC_WEBSITE_URL}/privacy-policy`}
className="text-blue-500"
>
{" "}
Privacy Policy
</Link>
</Checkbox>
);
return { acceptedTerms, renderCheckbox };
};
export default useAcceptedTerms;