diff options
| author | realtradam <[email protected]> | 2024-06-17 22:34:50 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2024-06-17 22:34:50 -0400 |
| commit | c8b131e33e54ef11e09f22efd83e9e83412996ce (patch) | |
| tree | cb385f6f28bf8e05871e800a93572ee7f530687b /src/components/Layout.tsx | |
| parent | 8a56707b929ffd92a9d4beb94a2cec8fce7d9262 (diff) | |
| download | malcz.com-c8b131e33e54ef11e09f22efd83e9e83412996ce.tar.gz malcz.com-c8b131e33e54ef11e09f22efd83e9e83412996ce.zip | |
change login to use new tab
Diffstat (limited to 'src/components/Layout.tsx')
| -rw-r--r-- | src/components/Layout.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index fe961cf..960e112 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -5,13 +5,16 @@ export type userData = { userData: { name: string } }; export default function Layout ({userData}: userData) { + const loginLink = () => { + window.open(`https://github.com/login/oauth/authorize?client_id=${import.meta.env.VITE_GITHUB_CLIENTID}`); + }; return ( <> <div id="page" className="star flex flex-row min-h-screen max-h-screen bg-amber-400 text-stone-950 text-xl bg-star bg-repeat bg-[length:170px_170px]"> <div id="sidebar" className="flex flex-row shrink-0 grow-0 h-vh w-64 items-top bg-stone-800"> <nav id="sidebar-content" dir="rtl" className="text-stone-50 p-6 w-full h-screen overflow-y-auto overflow-x-hidden"> <div dir='ltr'> - { userData.name ? <div className="flex items-end gap-2 pb-2"> <div className="text-xs"> Logged in as: </div> <div>{userData.name}</div> </div> : <a href="https://github.com/login/oauth/authorize?client_id=Ov23lilvF2QoyDWyY4mr" className="pb-2"> Login with Github </a> /* 74468ad0847e527262d9 */ } + { userData.name ? <div className="flex items-end gap-2 pb-2"> <div className="text-xs"> Logged in as: </div> <div>{userData.name}</div> </div> : <a href="" onClick={loginLink} className="pb-2"> Login with Github </a> } <div className="text-3xl py-10 text-center font-title">Tradam</div> <div className="flex flex-col items-center gap-1"> <Button link={ <Link to="/" className="absolute flex top-0 left-0 w-36 h-16 text-stone-50 bg-transparent justify-center items-center" role="button"><div className="h-min">About Me</div></Link> }/> |
