toggleSnippetPin(id)} className='cursor-pointer'>
- {isPinned ? (
-
- ) : (
-
+
+ {isAuthenticated && (
+ toggleSnippetPin(id)} className='cursor-pointer'>
+ {isPinned ? (
+
+ ) : (
+
+ )}
+
)}
-
+
);
};
diff --git a/client/src/store/AuthContext.tsx b/client/src/store/AuthContext.tsx
new file mode 100644
index 0000000..7316c1c
--- /dev/null
+++ b/client/src/store/AuthContext.tsx
@@ -0,0 +1,29 @@
+import { useState, createContext, ReactNode } from 'react';
+
+import { AuthContext as Context } from '../typescript/interfaces';
+
+export const AuthContext = createContext