+6
-4
src/components/Login.tsx
+6
-4
src/components/Login.tsx
···
6
}
7
8
export default function Login({ compact = false }: LoginProps) {
9
-
const { loginStatus, login, logout, loading, authed } = useAuth();
10
const [user, setUser] = useState("");
11
const [password, setPassword] = useState("");
12
const [serviceURL, setServiceURL] = useState("bsky.social");
···
112
<div className="p-6 bg-gray-100 dark:bg-gray-900 rounded-xl shadow border border-gray-200 dark:border-gray-800 mt-6 mx-4">
113
{authed ? (
114
<div className="flex flex-col items-center justify-center text-center">
115
-
<p className="text-lg font-semibold mb-6 text-gray-800 dark:text-gray-100">
116
You are logged in!
117
</p>
118
<button
119
onClick={logout}
120
-
className="bg-gray-600 hover:bg-gray-700 text-white rounded px-6 py-2 font-semibold text-base transition-colors"
121
>
122
Log out
123
</button>
···
193
};
194
195
if (!authed) {
196
return (
197
<div className="inline-block">
198
<span className="text-gray-100 text-base font-medium px-1.5">
···
218
alt="avatar"
219
className="w-[30px] h-[30px] rounded-full object-cover"
220
/>
221
-
<div>
222
<div className="text-gray-100 text-xs">{response?.displayName}</div>
223
<div className="text-gray-100 text-xs">@{response?.handle}</div>
224
</div>
···
6
}
7
8
export default function Login({ compact = false }: LoginProps) {
9
+
const { loginStatus, login, logout, loading, authed, agent } = useAuth();
10
const [user, setUser] = useState("");
11
const [password, setPassword] = useState("");
12
const [serviceURL, setServiceURL] = useState("bsky.social");
···
112
<div className="p-6 bg-gray-100 dark:bg-gray-900 rounded-xl shadow border border-gray-200 dark:border-gray-800 mt-6 mx-4">
113
{authed ? (
114
<div className="flex flex-col items-center justify-center text-center">
115
+
<p className="text-lg font-semibold mb-2 text-gray-800 dark:text-gray-100">
116
You are logged in!
117
</p>
118
+
<ProfileThing />
119
<button
120
onClick={logout}
121
+
className="bg-gray-600 mt-2 hover:bg-gray-700 text-white rounded px-6 py-2 font-semibold text-base transition-colors"
122
>
123
Log out
124
</button>
···
194
};
195
196
if (!authed) {
197
+
return
198
return (
199
<div className="inline-block">
200
<span className="text-gray-100 text-base font-medium px-1.5">
···
220
alt="avatar"
221
className="w-[30px] h-[30px] rounded-full object-cover"
222
/>
223
+
<div className="flex flex-col items-start">
224
<div className="text-gray-100 text-xs">{response?.displayName}</div>
225
<div className="text-gray-100 text-xs">@{response?.handle}</div>
226
</div>