Added checkbox for accepted terms
This commit is contained in:
32
src/hooks/useAcceptedTerms.tsx
Normal file
32
src/hooks/useAcceptedTerms.tsx
Normal 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;
|
||||
Reference in New Issue
Block a user