@@ -21,27 +36,25 @@ const Navbar: React.FC = () => {
-
-
+ Sign In
+
+ )}
-
@@ -59,6 +72,11 @@ const Navbar: React.FC = () => {
Settings
+ -
+
+ Sign Out
+
+
diff --git a/src/constants/url.ts b/src/constants/url.ts
new file mode 100644
index 0000000..2bc6f6d
--- /dev/null
+++ b/src/constants/url.ts
@@ -0,0 +1,3 @@
+export const TINY_API_URL = 'https://api-tinysite.onrender.com/v1';
+export const TINY_API_GOOGLE_LOGIN = `${TINY_API_URL}/auth/google/login`;
+export const TINY_API_LOGOUT = `${TINY_API_URL}/auth/logout`;
diff --git a/src/hooks/isAuthenticated.ts b/src/hooks/isAuthenticated.ts
new file mode 100644
index 0000000..3e8a42e
--- /dev/null
+++ b/src/hooks/isAuthenticated.ts
@@ -0,0 +1,35 @@
+import { useEffect, useState } from 'react';
+import { TINY_API_URL } from '@/constants/url';
+import { UserTypes } from '@/types/user.types';
+
+const IsAuthenticated = () => {
+ const [isLoggedIn, setIsLoggedIn] = useState(false);
+ const [userData, setUserData] = useState