rafi-adly commited on
Commit
e84614d
·
1 Parent(s): 31d972a

delete useAuth

Browse files
fe/components/myComponents/Dashboard.tsx CHANGED
@@ -1,20 +1,13 @@
1
  import React from 'react';
2
 
3
  function Dashboard() {
4
- const { currentUser, userProfile, loading } = useAuth(); // Dapatkan userProfile dari context
5
- if (loading && !userProfile) {
6
- // Tampilkan loading jika data profil belum ada
7
- return (
8
- <div className="p-4">
9
- <p>Loading user data...</p>
10
- {/* Atau Spinner */}
11
- </div>
12
- );
13
- }
14
  return (
15
  <div>
16
  <h1 className="text-2xl font-semibold mb-4">
17
- Welcome, {userProfile?.firstName || currentUser?.displayName || 'User'}!
18
  </h1>
19
  </div>
20
  );
 
1
  import React from 'react';
2
 
3
  function Dashboard() {
4
+ // useAuth dinonaktifkan sementara.
5
+ const defaultName = 'User';
6
+
 
 
 
 
 
 
 
7
  return (
8
  <div>
9
  <h1 className="text-2xl font-semibold mb-4">
10
+ Welcome, {defaultName}!
11
  </h1>
12
  </div>
13
  );