Auto-inlog opent in nieuw tabblad via GET route
Vervangt server action door /api/auto-login GET route zodat <a target="_blank"> werkt. Server action verwijderd. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+8
-11
@@ -3,7 +3,6 @@ import { getSession } from "../../lib/auth";
|
||||
import { listAccounts } from "../../lib/platform-db";
|
||||
import { createTenant, deleteTenant } from "./actions";
|
||||
import { logout } from "./logout";
|
||||
import { autoLogin } from "./auto-login";
|
||||
|
||||
export default async function TenantsPage({
|
||||
searchParams,
|
||||
@@ -80,16 +79,14 @@ export default async function TenantsPage({
|
||||
{new Date(a.created_at).toLocaleDateString("nl-NL")}
|
||||
</td>
|
||||
<td className="px-4 py-3 text-right">
|
||||
<form action={autoLogin}>
|
||||
<input type="hidden" name="account_id" value={a.id} />
|
||||
<input type="hidden" name="slug" value={a.slug} />
|
||||
<button
|
||||
type="submit"
|
||||
className="text-xs text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 transition-colors"
|
||||
>
|
||||
Inloggen
|
||||
</button>
|
||||
</form>
|
||||
<a
|
||||
href={`/api/auto-login?account_id=${a.id}&slug=${a.slug}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-xs text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 transition-colors"
|
||||
>
|
||||
Inloggen ↗
|
||||
</a>
|
||||
</td>
|
||||
<td className="px-4 py-3 text-right">
|
||||
<form action={deleteTenant}>
|
||||
|
||||
Reference in New Issue
Block a user