File tree 1 file changed +16
-2
lines changed
resources/assets/js/prototype/components
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 1
1
<script setup>
2
- import { ArrowRightLeft , Home } from ' lucide-vue' ;
2
+ import { ArrowRightLeft , Home , LogOut } from ' lucide-vue' ;
3
+ import { getCurrentInstance } from ' vue' ;
4
+
5
+ const router = getCurrentInstance ().proxy .$router ;
6
+
7
+ const logOut = () => {
8
+ localStorage .removeItem (' api_key' );
9
+
10
+ router .push (' login' );
11
+ };
3
12
</script >
4
13
5
14
<template >
6
15
<div class =" flex items-center h-16 bg-white border-b border-gray-200" >
7
- <div class =" mx-auto flex-1 max-w-5xl" >
16
+ <div class =" mx-auto flex-1 flex items-center justify-between max-w-5xl" >
8
17
<div class =" flex space-x-4" >
9
18
<router-link class =" flex items-center py-1 px-3 text-gray-500 hover:text-black" :to =" { name: 'dashboard' }" >
10
19
<Home :size =" 16" />
@@ -15,6 +24,11 @@ import { ArrowRightLeft, Home } from 'lucide-vue';
15
24
<span class =" ml-2 text-sm" >Transactions</span >
16
25
</router-link >
17
26
</div >
27
+ <div >
28
+ <button class =" flex py-1 px-3 text-gray-500 hover:text-black" @click =" logOut()" >
29
+ <LogOut :size =" 16" />
30
+ </button >
31
+ </div >
18
32
</div >
19
33
</div >
20
34
</template >
You can’t perform that action at this time.
0 commit comments