Delete web/src/components/AccessToken.tsx with huggingface_hub
Browse files
web/src/components/AccessToken.tsx
DELETED
|
@@ -1,9 +0,0 @@
|
|
| 1 |
-
"use client";
|
| 2 |
-
import {useState} from "react";
|
| 3 |
-
export function AccessToken({admin=false}: {admin?:boolean}) {
|
| 4 |
-
const [saved, setSaved] = useState(false);
|
| 5 |
-
return <label className="block my-3 text-sm">{admin ? "Admin" : "Session"} access token (kept in this tab only)
|
| 6 |
-
<input aria-label={admin ? "Admin token" : "Session token"} type="password" autoComplete="off" className="vm-input ml-2" onChange={e=>{sessionStorage.setItem(admin ? "vm-admin-token":"vm-user-token",e.target.value); setSaved(true);}} />
|
| 7 |
-
{saved && <span className="text-muted ml-2">Stored for this tab</span>}
|
| 8 |
-
</label>;
|
| 9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|