@@ -4,6 +4,7 @@ import { useNavigate } from 'react-router-dom';
4
4
import styled from 'styled-components' ;
5
5
import { v4 as uuidv4 } from 'uuid' ;
6
6
import UserStore from '../../stores/userStore' ;
7
+ import vectors from '../atoms/Vectors' ;
7
8
8
9
export default function InputNickname ( ) {
9
10
const navigate = useNavigate ( ) ;
@@ -48,51 +49,104 @@ export default function InputNickname() {
48
49
// socket.emit('ENTER_ROOM', payload, (confirmRoomId) => {
49
50
// navigate(`screens`);
50
51
// });
51
- navigate ( `lobby ` ) ;
52
+ navigate ( `/ ` ) ;
52
53
} ;
53
54
54
55
const onChange = ( event : React . ChangeEvent < HTMLInputElement > ) => {
55
56
setNickname ( event . target . value ) ;
56
57
} ;
57
58
58
59
return (
59
- < Form onSubmit = { onSubmit } >
60
- < Input
61
- autoComplete = "off"
62
- value = { nickname }
63
- onChange = { onChange }
64
- placeholder = "Enter ID"
65
- id = "nickname"
66
- />
67
- < Button disabled = { nickname === null || ! nickname . length } > Enter</ Button >
68
- </ Form >
60
+ < >
61
+ < Vector src = { vectors . Lamp } left = { 0 } top = { 0 } size = { 40 } />
62
+ < Vector src = { vectors . Book } left = { 28.7 } top = { 14.4 } size = { 60 } />
63
+ < Message >
64
+ < TitleLogo >
65
+ 모여서 도란도란 코딩,< span > Modoco</ span >
66
+ </ TitleLogo >
67
+ < TitleStart > 시작하기</ TitleStart >
68
+ </ Message >
69
+ < Form onSubmit = { onSubmit } >
70
+ < Input
71
+ autoComplete = "off"
72
+ value = { nickname }
73
+ onChange = { onChange }
74
+ placeholder = "Enter ID"
75
+ id = "nickname"
76
+ />
77
+ < Button disabled = { nickname === null || ! nickname . length } > Enter</ Button >
78
+ { /* <Button>GitHub 계정</Button> */ }
79
+ </ Form >
80
+ </ >
69
81
) ;
70
82
}
71
83
84
+ interface Position {
85
+ size ?: number ;
86
+ left ?: number ;
87
+ top : number ;
88
+ right ?: number ;
89
+ }
90
+
91
+ const Vector = styled . img < Position > `
92
+ position: absolute;
93
+ width: ${ ( props ) => props . size } rem;
94
+ left: ${ ( props ) => props . left } %;
95
+ top: ${ ( props ) => props . top } %;
96
+ opacity: 0.5;
97
+ z-index: 1000;
98
+ ` ;
99
+
100
+ const Message = styled . div `
101
+ display: flex;
102
+ flex-direction: column;
103
+ justify-content: center;
104
+ align-items: center;
105
+ color: white;
106
+ width: 100%;
107
+ z-index: 1001;
108
+ ` ;
109
+
110
+ const TitleLogo = styled . div `
111
+ font-size: 18px;
112
+ font-family: IBMPlexMonoRegular;
113
+ ` ;
114
+
115
+ const TitleStart = styled . div `
116
+ font-family: Pretendard;
117
+ font-weight: 500;
118
+ font-size: 4rem;
119
+ margin-top: 2rem;
120
+ ` ;
121
+
72
122
const Form = styled . form `
73
- margin-top: 10rem ;
123
+ margin-top: 15rem ;
74
124
display: flex;
75
125
flex-direction: column;
76
126
align-items: center;
77
127
justify-content: center;
78
-
128
+ z-index: 1001;
79
129
button,
80
130
input {
81
- height: 5rem;
82
- border-radius: 0.5rem;
83
- width: 100%;
84
- max-width: 30rem;
85
- font-size: 2rem;
86
- box-shadow: 2px 2px rgb(0 0 0 / 18%);
131
+ font-family: Pretendard;
132
+ font-weight: 600;
133
+ height: 6rem;
134
+ width: 40rem;
135
+ border-radius: 0.8rem;
87
136
}
88
137
` ;
89
138
90
139
const Button = styled . button `
91
- background-color: #fbeaeb;
140
+ font-size: 1.5rem;
141
+ background-color: white;
92
142
margin-top: 2rem;
143
+ cursor: pointer;
93
144
` ;
94
145
95
146
const Input = styled . input `
147
+ background-color: rgb(30, 41, 75);
148
+ color: white;
149
+ font-size: 1.7rem;
96
150
text-justify: center;
97
151
padding-left: 1rem;
98
152
` ;
0 commit comments