aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/Contact.js
diff options
context:
space:
mode:
authorJeff <jeffkleinaitis@gmail.com>2024-04-19 17:04:38 -0400
committerJeff <jeffkleinaitis@gmail.com>2024-04-19 17:04:38 -0400
commit97fef2a3de5473bad66d289baa0ee51b322dfc0d (patch)
treef151df9e5406052c17f7455076fb5b81bb795c03 /src/pages/Contact.js
parent76615aea36b76d76aa3c34d25273b49bf6a8d073 (diff)
feat: Add ternary to conditionally render GridLayout if a user is logged in
Diffstat (limited to 'src/pages/Contact.js')
-rw-r--r--src/pages/Contact.js26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/pages/Contact.js b/src/pages/Contact.js
index e174b9a..dfcc05a 100644
--- a/src/pages/Contact.js
+++ b/src/pages/Contact.js
@@ -1,3 +1,23 @@
-export default function ContactUs() {
- return <h1>dont contact us pls</h1>
-} \ No newline at end of file
+import React, { useContext } from 'react';
+import { AuthContext } from '../providers/AuthContext';
+import GridLayout from '../layouts/GridLayout';
+
+const ContactUs = () => {
+ const { user } = useContext(AuthContext);
+
+ return (
+ <>
+ {!user ? (
+ <h1>don't contact us pls</h1>
+ ) : (
+ <GridLayout>
+ <>
+ don't contact us pls
+ </>
+ </GridLayout>
+ )}
+ </>
+ );
+};
+
+export default ContactUs; \ No newline at end of file