generated from deco-sites/storefront
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f99c37
commit f0399e2
Showing
3 changed files
with
33 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import Icon from "$store/components/ui/Icon.tsx"; | ||
import { useUser } from "apps/vtex/hooks/useUser.ts"; | ||
|
||
export default function LoginElement() { | ||
const { user } = useUser(); | ||
|
||
return ( | ||
<div class="flex items-center justify-center text-sm"> | ||
<div class="flex w-8 h-6 gap-1"> | ||
<Icon id="User" size={24} strokeWidth={0.4} /> | ||
</div> | ||
|
||
<div class="flex flex-col gap-0.5"> | ||
<p> | ||
Olá! {user?.value?.email | ||
? <a href="/account">{user.value?.name || user.value?.email}</a> | ||
: <a href="/account">Faça seu login</a>} | ||
</p> | ||
<p class="flex items-center gap-0.5 text-xs font-bold"> | ||
<a href="/account">Minha Conta</a> | ||
| | ||
<a href="/account#/orders">Meus Pedidos</a> | ||
</p> | ||
</div> | ||
</div> | ||
); | ||
} |