File tree Expand file tree Collapse file tree 1 file changed +54
-1
lines changed Expand file tree Collapse file tree 1 file changed +54
-1
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <h1 >Welcome</h1 >
2
+ <main class =" welcome-container" >
3
+ <h1 >Welcome</h1 >
4
+ <h2 >User's Email: <br > <strong >{{ email }}</strong ></h2 >
5
+ <button @click =" handleLogout" class =" logout" >Log out</button >
6
+ <small >I love instabug ❤</small >
7
+ </main >
3
8
</template >
4
9
5
10
<script >
6
11
export default {
7
12
name: " WelcomeView" ,
13
+ data () {
14
+ return {
15
+ email: window .localStorage .getItem (" email" ),
16
+ }
17
+ },
18
+ methods: {
19
+ handleLogout () {
20
+ window .localStorage .removeItem (" email" );
21
+ this .$router .push (" /login" );
22
+ }
23
+ },
8
24
}
9
25
</script >
26
+
27
+ <style lang="scss" scoped>
28
+
29
+ .welcome-container {
30
+ display : flex ;
31
+ flex-direction : column ;
32
+ align-items : center ;
33
+ justify-content : center ;
34
+ padding : 10px 20px 50px 20px ;
35
+ min-height : 100vh ;
36
+
37
+ h2 {
38
+ font-weight : 400 ;
39
+ margin : 20px ;
40
+ text-align : center ;
41
+ }
42
+
43
+ button {
44
+ border : 0 ;
45
+ border-radius : 5px ;
46
+ background-color : $blue-background ;
47
+ padding : 8px 50px ;
48
+ color : $white-text ;
49
+ font-weight : 600 ;
50
+ font-size : 16px ;
51
+ cursor : pointer ;
52
+
53
+ & :hover {
54
+ opacity : 0.9 ;
55
+ }
56
+ }
57
+
58
+ small {
59
+ margin : 10px ;
60
+ }
61
+ }
62
+ </style >
You can’t perform that action at this time.
0 commit comments