Skip to content

Commit

Permalink
fixs
Browse files Browse the repository at this point in the history
  • Loading branch information
sandygudie committed Mar 22, 2024
1 parent feda148 commit 2f25ff2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions client/src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ onMounted(async () => {
isLoading.value = true
let existingUserId = getUserId()
if (!existingUserId) {
// return router.push('/login')
return router.push('/login')
}
userId = existingUserId
console.log(userId)
try {
const profileResponse = await getProfile(userId)
Expand Down
5 changes: 2 additions & 3 deletions client/src/views/LoginView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ const login = () => {
isLoading.value = true
let result = await googleLogin({ token: response.access_token })
if (result.success) {
console.log(result)
setToken(result.accessToken)
setUserID(result.userID)
// return window.location.replace('/')
return window.location.replace('/')
}
} catch (err: any) {
toast.error(err.toString(), {
Expand Down Expand Up @@ -62,7 +61,7 @@ const login = () => {
<img
className="w-full sm:h-52 md:h-64 lg:h-auto"
src="/assets/social-media-collection.webp"
alt="devlink logo"
alt="social media collection"
loading="eager"
/>
</div>
Expand Down

0 comments on commit 2f25ff2

Please sign in to comment.