@@ -48,6 +48,10 @@ const AddsModal: React.FC<AddsModalProps> = React.memo(({ setOpen }) => {
48
48
49
49
} ) ;
50
50
} ;
51
+ function myFunction ( ) {
52
+ location . replace ( "/" )
53
+ }
54
+
51
55
//uncomment below to bring back database, description-TG
52
56
// const { database, URI, name, description } = fields;
53
57
const { URI , name } = fields ;
@@ -59,105 +63,28 @@ const AddsModal: React.FC<AddsModalProps> = React.memo(({ setOpen }) => {
59
63
60
64
</ div >
61
65
< form onSubmit = { handleSubmit } >
62
- { /* <p>Required*</p> */ }
63
- < div >
64
- { /* <label htmlFor="db-type">
65
- Type<span>*</span>
66
- </label> */ }
67
- { /* <select id="db-type" name="database" value={database} onChange={e => handleChange(e)}>
68
- <option value="SQL">SQL</option>
69
- <option value="MongoDB">MongoDB</option>
70
- </select> */ }
71
- </ div >
72
- { /* <div>
73
- <label htmlFor="db-uri">
74
- EMAIL<span>*</span>
75
- </label>
76
- <input
77
- id="db-uri"
78
- name="URI"
79
- value={Email}
80
- onChange={e => handleChange(e)}
81
- placeholder="EMAIL ADDRESS"
82
- required
83
- />
84
- </div> */ }
66
+
85
67
86
68
< div >
87
69
< label htmlFor = "db-uri" >
88
70
< span > </ span >
89
71
</ label >
90
- { /* <input
91
- id="db-uri"
92
- name="URI"
93
- value={URI}
94
- onChange={e => handleChange(e)}
95
- placeholder="ENTER EMAIL ADDDRESS"
96
- required
97
- /> */ }
72
+
98
73
</ div >
99
74
< div >
100
75
< label htmlFor = "db-name" >
101
76
102
77
< p > < h4 > ACCESS LEVEL: </ h4 > </ p >
103
78
</ label >
104
79
105
-
106
- { /* <label htmlFor="db-name">
107
- PASSWORD<span>*</span>
108
- </label> */ }
109
- { /* <input
110
- id="db-name"
111
- type="text"
112
- name="name"
113
- value={name}
114
- onChange={e => handleChange(e)}
115
- placeholder="ENTER PASSWORD"
116
- required
117
- /> */ }
80
+
118
81
</ div >
119
82
< div >
120
- { /* <label htmlFor="db-desc">Description</label>
121
- <textarea
122
- id="db-desc"
123
- name="description"
124
- value={description}
125
- onChange={e => handleChange(e)}
126
- placeholder="Add a short description"
127
- /> */ }
83
+
128
84
</ div >
129
85
< button > Cancel</ button >
130
86
< br > </ br >
131
- < button onClick = { e => ( alert ( 'Are you sure you want to log out?' ) ) } > Log Out</ button >
132
- { /* <!-- sign up with Google button --> */ }
133
- { /* <div className="col-lg-14"> */ }
134
- { /* <div className="card">
135
- <div className="card-body"> */ }
136
- { /* href makes a request to the following path-->change as needed --> */ }
137
- { /* <button className= 'googleL'>
138
- <a className="btn btn-block btn-social btn-google" href="/auth/google" role="button">
139
- <i className="fab fa-google"></i>
140
- Google Sign Up */ }
141
- { /* </a>
142
- </button>
143
- </div> */ }
144
- { /* </div>
145
- </div> */ }
146
-
147
- { /* <div className="col-sm-10">
148
- <div className="card">
149
- <div className="card-body">
150
- <button className= 'googleS'>
151
- {/* <!-- href makes a request to the following path-->change as needed --> */ }
152
- { /* <a className="btn btn-block btn-social btn-google" href="/auth/google" role="button">
153
- <i className="fab fa-google"></i>
154
- Google Sign In
155
- </a>
156
- </button>
157
- </div>
158
- </div>
159
- // </div> */ }
160
-
87
+ < button className = "link" id = "submitBtn" type = "submit" onClick = { myFunction } > Log Out</ button >
161
88
</ form >
162
89
</ div >
163
90
) ;
0 commit comments