Spaces:
Sleeping
Sleeping
Create components/AgeGate.tsx
Browse files- components/AgeGate.tsx +49 -0
components/AgeGate.tsx
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from 'react';
|
| 2 |
+
import { ShieldCheck, Ban } from 'lucide-react';
|
| 3 |
+
|
| 4 |
+
interface AgeGateProps {
|
| 5 |
+
onVerify: (verified: boolean) => void;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
const AgeGate: React.FC<AgeGateProps> = ({ onVerify }) => {
|
| 9 |
+
return (
|
| 10 |
+
<div className="fixed inset-0 z-50 flex items-center justify-center p-4 bg-gray-900/95 backdrop-blur-md">
|
| 11 |
+
<div className="bg-gray-800 border border-emerald-700/50 rounded-2xl shadow-2xl max-w-md w-full p-8 text-center relative overflow-hidden">
|
| 12 |
+
{/* Decorative background glow */}
|
| 13 |
+
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-32 h-32 bg-emerald-500/20 rounded-full blur-3xl -z-10"></div>
|
| 14 |
+
|
| 15 |
+
<div className="mx-auto w-16 h-16 bg-emerald-900/50 rounded-full flex items-center justify-center mb-6 border border-emerald-500/30">
|
| 16 |
+
<ShieldCheck className="w-8 h-8 text-emerald-400" />
|
| 17 |
+
</div>
|
| 18 |
+
|
| 19 |
+
<h2 className="text-3xl font-bold text-white mb-2">Age Verification</h2>
|
| 20 |
+
<p className="text-gray-400 mb-8">
|
| 21 |
+
You must be 21 years or older to access this cannabis educational assistant.
|
| 22 |
+
</p>
|
| 23 |
+
|
| 24 |
+
<div className="flex flex-col gap-3">
|
| 25 |
+
<button
|
| 26 |
+
onClick={() => onVerify(true)}
|
| 27 |
+
className="w-full py-3.5 px-6 bg-emerald-600 hover:bg-emerald-500 text-white font-semibold rounded-xl transition-all duration-200 transform hover:scale-[1.02] shadow-lg shadow-emerald-900/50"
|
| 28 |
+
>
|
| 29 |
+
Yes, I am 21+
|
| 30 |
+
</button>
|
| 31 |
+
|
| 32 |
+
<button
|
| 33 |
+
onClick={() => onVerify(false)}
|
| 34 |
+
className="w-full py-3.5 px-6 bg-gray-700 hover:bg-gray-600 text-gray-300 font-semibold rounded-xl transition-colors flex items-center justify-center gap-2"
|
| 35 |
+
>
|
| 36 |
+
<Ban className="w-4 h-4" />
|
| 37 |
+
No, I am not
|
| 38 |
+
</button>
|
| 39 |
+
</div>
|
| 40 |
+
|
| 41 |
+
<p className="mt-6 text-xs text-gray-500">
|
| 42 |
+
By entering, you agree to view educational content regarding cannabis strains and products.
|
| 43 |
+
</p>
|
| 44 |
+
</div>
|
| 45 |
+
</div>
|
| 46 |
+
);
|
| 47 |
+
};
|
| 48 |
+
|
| 49 |
+
export default AgeGate;
|