-
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
Showing
12 changed files
with
101 additions
and
39 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,9 +1,40 @@ | ||
<script setup lang="ts"> | ||
import AppButton from '@/ui/components/AppButton.vue' | ||
import { onMounted, ref } from 'vue' | ||
import { getUser } from '@/http/requests.ts' | ||
import { useAuthStore } from '@/stores/auth.ts' | ||
import type { User } from '@/proto/api/v1/shared_pb.ts' | ||
import { UserCircleIcon } from '@heroicons/vue/24/solid' | ||
const user = ref<User>() | ||
onMounted(async () => { | ||
await fetchUser() | ||
}) | ||
const fetchUser = async () => { | ||
const res = await getUser(useAuthStore().userId) | ||
if (!res) return | ||
user.value = res.user | ||
} | ||
</script> | ||
|
||
<template> | ||
<div class="container"> | ||
<UserCircleIcon class="size-48 mx-auto text-gray-900" /> | ||
<h1>{{ user?.firstName }} {{ user?.lastName }}</h1> | ||
<p>{{ user?.email }}</p> | ||
</div> | ||
<AppButton type="link" to="/logout" colour="red" container-class="px-4 pb-4"> Logout </AppButton> | ||
</template> | ||
|
||
<style scoped></style> | ||
<style scoped> | ||
.container { | ||
@apply text-center mb-4; | ||
} | ||
h1 { | ||
@apply text-xl font-medium; | ||
} | ||
</style> |
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