Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
eue
Commits
07a9f48d
Commit
07a9f48d
authored
Jul 21, 2021
by
Spark
Browse files
210721 commit
parent
36bfc116
Changes
16
Show whitespace changes
Inline
Side-by-side
client/src/Utils/Oauth.js
View file @
07a9f48d
import
axios
from
'
axios
'
;
import
{
Spinner
,
Button
,
Row
}
from
'
react-bootstrap
'
;
import
{
Spinner
,
Button
,
Col
,
Row
}
from
'
react-bootstrap
'
;
import
{
useHistory
}
from
'
react-router-dom
'
;
// export const KAKAO_AUTH_URL = `https://kauth.kakao.com/oauth/authorize?client_id=${CLIENT_ID}&redirect_uri=${REDIRECT_URI}&response_type=code`;
// export const KAKAO_AUTH_URL = `https://kauth.kakao.com/oauth/authorize?client_id=${CLIENT_ID}&redirect_uri=${REDIRECT_URI}&response_type=code`;
...
@@ -65,10 +63,8 @@ export function kakaoLogout() {
...
@@ -65,10 +63,8 @@ export function kakaoLogout() {
export
function
Loading
()
{
export
function
Loading
()
{
return
(
return
(
<
Row
className
=
'
d-block
'
>
<
Row
className
=
'
d-block
'
>
<
Button
id
=
'
formbtn
'
className
=
'
d-flex justify-content-center align-items-center m-auto
'
style
=
{{
width
:
'
200px
'
,
height
:
'
200px
'
,
flexDirection
:
'
column
'
}}
disabled
>
<
Button
id
=
'
formbtn
'
className
=
'
d-flex justify-content-center align-items-center m-auto
'
style
=
{{
width
:
'
200px
'
,
height
:
'
200px
'
,
flexDirection
:
'
column
'
}}
disabled
>
<
Spinner
animation
=
"
border
"
role
=
"
status
"
>
<
Spinner
animation
=
"
border
"
role
=
"
status
"
>
<
span
className
=
"
sr-only
"
>
Loading
...
<
/span
>
<
span
className
=
"
sr-only
"
>
Loading
...
<
/span
>
...
...
client/src/components/ChartDoughnut.js
View file @
07a9f48d
import
React
from
'
react
'
import
React
from
'
react
'
import
{
Container
,
Row
,
Card
,
Table
,
Button
}
from
'
react-bootstrap
'
;
import
{
Row
,
Card
}
from
'
react-bootstrap
'
;
import
{
Doughnut
}
from
'
react-chartjs-2
'
import
{
Doughnut
}
from
'
react-chartjs-2
'
function
ChartDoughnut
()
{
function
ChartDoughnut
()
{
...
@@ -14,15 +14,6 @@ function ChartDoughnut() {
...
@@ -14,15 +14,6 @@ function ChartDoughnut() {
borderColor
:
'
rgb(110, 189, 142)
'
,
borderColor
:
'
rgb(110, 189, 142)
'
,
color
:
'
#04AB70
'
color
:
'
#04AB70
'
}
}
const
btnstyled
=
{
background
:
'
rgb(110, 189, 142)
'
,
margin
:
'
1px
'
,
maxWidth
:
'
100%
'
,
borderWidth
:
'
2px
'
,
fontSize
:
'
10px
'
,
borderColor
:
'
rgba(195, 195, 195, 0.753)
'
,
borderRadius
:
'
20px
'
,
}
const
options
=
{
const
options
=
{
legend
:
{
legend
:
{
...
...
client/src/components/ChartLine.js
View file @
07a9f48d
import
React
from
'
react
'
import
React
from
'
react
'
import
{
Container
,
Row
,
Card
,
Table
,
Button
}
from
'
react-bootstrap
'
;
import
{
Row
,
Card
}
from
'
react-bootstrap
'
;
import
{
Line
}
from
'
react-chartjs-2
'
import
{
Line
}
from
'
react-chartjs-2
'
function
ChartLine
()
{
function
ChartLine
()
{
...
@@ -14,15 +14,7 @@ function ChartLine() {
...
@@ -14,15 +14,7 @@ function ChartLine() {
borderColor
:
'
rgb(110, 189, 142)
'
,
borderColor
:
'
rgb(110, 189, 142)
'
,
color
:
'
#04AB70
'
color
:
'
#04AB70
'
}
}
const
btnstyled
=
{
background
:
'
rgb(110, 189, 142)
'
,
margin
:
'
1px
'
,
maxWidth
:
'
100%
'
,
borderWidth
:
'
2px
'
,
fontSize
:
'
10px
'
,
borderColor
:
'
rgba(195, 195, 195, 0.753)
'
,
borderRadius
:
'
20px
'
,
}
const
options
=
{
const
options
=
{
legend
:
{
legend
:
{
display
:
true
,
// label 보이기 여부
display
:
true
,
// label 보이기 여부
...
...
client/src/components/EueSuggest.js
View file @
07a9f48d
import
React
from
'
react
'
import
React
from
'
react
'
import
{
Container
,
Row
,
Card
,
Table
,
Button
}
from
'
react-bootstrap
'
;
import
{
Row
,
Card
}
from
'
react-bootstrap
'
;
function
EueSuggest
()
{
function
EueSuggest
()
{
const
cardstyled
=
{
const
cardstyled
=
{
...
@@ -13,15 +13,6 @@ function EueSuggest() {
...
@@ -13,15 +13,6 @@ function EueSuggest() {
borderColor
:
'
rgb(110, 189, 142)
'
,
borderColor
:
'
rgb(110, 189, 142)
'
,
color
:
'
#04AB70
'
color
:
'
#04AB70
'
}
}
const
btnstyled
=
{
background
:
'
rgb(110, 189, 142)
'
,
margin
:
'
1px
'
,
maxWidth
:
'
100%
'
,
borderWidth
:
'
2px
'
,
fontSize
:
'
10px
'
,
borderColor
:
'
rgba(195, 195, 195, 0.753)
'
,
borderRadius
:
'
20px
'
,
}
return
(
return
(
<
Row
className
=
'
text-center w-100 my-2
'
>
<
Row
className
=
'
text-center w-100 my-2
'
>
...
...
client/src/components/Footer.js
View file @
07a9f48d
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'
react
'
import
React
,
{
useEffect
,
useState
}
from
'
react
'
import
{
Container
,
Row
,
Card
,
Table
,
Button
,
Col
,
Modal
,
ModalTitle
,
Overlay
,
Tooltip
}
from
'
react-bootstrap
'
;
import
{
Row
,
Card
,
Button
,
Col
,
Modal
,
}
from
'
react-bootstrap
'
;
import
{
CopyToClipboard
}
from
'
react-copy-to-clipboard
'
;
import
{
CopyToClipboard
}
from
'
react-copy-to-clipboard
'
;
import
'
../App.css
'
import
'
../App.css
'
...
...
client/src/components/LocCodeChange.js
View file @
07a9f48d
import
React
from
'
react
'
import
React
from
'
react
'
import
'
../App.css
'
import
'
../App.css
'
import
{
Form
,
Modal
,
Button
,
Row
,
Col
,
Image
,
Alert
,
Card
,
DropdownButton
,
Dropdown
,
ButtonGroup
}
from
'
react-bootstrap
'
;
import
{
Form
,
Button
,
Row
,
Col
,
Card
,
DropdownButton
,
Dropdown
,
ButtonGroup
}
from
'
react-bootstrap
'
;
import
Oauth
,
{
LoginWithKakao
}
from
'
../utils/Oauth
'
;
import
{
useEffect
}
from
'
react
'
;
import
axios
from
'
axios
'
;
import
{
useState
}
from
'
react
'
;
import
{
useState
}
from
'
react
'
;
function
LocCodeChange
()
{
function
LocCodeChange
()
{
...
@@ -68,8 +65,7 @@ function LocCodeChange() {
...
@@ -68,8 +65,7 @@ function LocCodeChange() {
style
=
{
btnstyled2
}
style
=
{
btnstyled2
}
title
=
'
지역코드
'
title
=
'
지역코드
'
as
=
{
ButtonGroup
}
as
=
{
ButtonGroup
}
title
=
{
`
${
localname
}
`
}
title
=
{
`
${
localname
}
`
}
>
>
<
Dropdown
.
Item
>
Action
<
/Dropdown.Item
>
<
Dropdown
.
Item
>
Action
<
/Dropdown.Item
>
<
Dropdown
.
Item
>
Another
action
<
/Dropdown.Item
>
<
Dropdown
.
Item
>
Another
action
<
/Dropdown.Item
>
<
Dropdown
.
Item
>
Something
else
here
<
/Dropdown.Item
>
<
Dropdown
.
Item
>
Something
else
here
<
/Dropdown.Item
>
...
...
client/src/components/LocalCode.js
View file @
07a9f48d
import
React
,
{
useState
}
from
'
react
'
import
React
,
{
useState
}
from
'
react
'
import
{
Container
,
Row
,
Card
,
Table
,
Button
,
Col
,
Modal
}
from
'
react-bootstrap
'
;
import
{
Row
,
Card
,
Button
,
Col
,
Modal
}
from
'
react-bootstrap
'
;
// import db from "../db/index"
// import db from "../db/index"
import
'
../App.css
'
import
'
../App.css
'
import
{
LoginWithKakao
}
from
'
../utils/Oauth
'
;
import
{
Link
}
from
'
react-router-dom
'
;
import
{
Link
}
from
'
react-router-dom
'
;
...
...
client/src/components/LoginComp.js
View file @
07a9f48d
import
React
from
'
react
'
import
React
from
'
react
'
import
'
../App.css
'
import
'
../App.css
'
import
{
Form
,
Modal
,
Button
,
Row
,
Col
,
Image
,
Alert
,
Card
}
from
'
react-bootstrap
'
;
import
{
Form
,
Button
,
Row
,
Col
,
Card
}
from
'
react-bootstrap
'
;
import
Oauth
,
{
LoginWithKakao
}
from
'
../utils/Oauth
'
;
import
{
LoginWithKakao
}
from
'
../utils/Oauth
'
;
import
{
useEffect
}
from
'
react
'
;
import
axios
from
'
axios
'
;
import
{
useState
}
from
'
react
'
;
function
LoginComp
()
{
function
LoginComp
()
{
...
...
client/src/components/MainLayer.js
View file @
07a9f48d
import
React
from
'
react
'
import
React
from
'
react
'
import
{
useState
}
from
'
react
'
;
import
{
Button
,
Image
,
Row
,
ButtonGroup
,
}
from
'
react-bootstrap
'
;
import
{
Button
,
Form
,
Image
,
Row
,
ButtonGroup
,
Modal
,
Dropdown
,
Col
}
from
'
react-bootstrap
'
;
import
{
Link
}
from
'
react-router-dom
'
;
import
{
Link
,
useHistory
}
from
'
react-router-dom
'
;
import
'
../App.css
'
import
'
../App.css
'
import
LoginComp
from
'
./LoginComp
'
;
import
LocalCode
from
'
../components/LocalCode
'
;
import
LocalCode
from
'
../components/LocalCode
'
;
// import { isOauthChecked } from './../utils/Auth';
import
{
kakaoLogout
}
from
'
../utils/Oauth
'
;
import
{
kakaoLogout
}
from
'
../utils/Oauth
'
;
function
MainLayer
()
{
function
MainLayer
()
{
const
history
=
useHistory
()
const
boxstyled
=
{
const
boxstyled
=
{
border
:
'
solid
'
,
border
:
'
solid
'
,
...
...
client/src/components/SignupComp.js
View file @
07a9f48d
import
React
,
{
useEffect
,
useState
}
from
'
react
'
import
React
,
{
useState
}
from
'
react
'
import
'
../App.css
'
import
'
../App.css
'
import
{
Form
,
Modal
,
Button
,
Row
,
Col
,
Image
,
DropdownButton
,
ButtonGroup
,
Dropdown
,
Card
}
from
'
react-bootstrap
'
;
import
{
Form
,
Button
,
Row
,
Col
,
Card
}
from
'
react-bootstrap
'
;
// import { KAKAO_AUTH_URL } from '../components/Oauth';
// import { handleLogin } from '../utils/Auth';
// import { isOauth } from '../utils/Auth';
import
{
LoginWithKakao
}
from
'
../utils/Oauth
'
;
import
{
LoginWithKakao
}
from
'
../utils/Oauth
'
;
function
SignupComp
()
{
function
SignupComp
()
{
const
noticestyled
=
{
display
:
'
flex
'
,
justifyContent
:
'
center
'
,
color
:
'
gray
'
,
margin
:
'
auto
'
,
fontSize
:
'
0.8em
'
,
visibility
:
'
hidden
'
,
}
const
cardstyled
=
{
const
cardstyled
=
{
margin
:
'
auto
'
,
margin
:
'
auto
'
,
padding
:
'
1em
'
,
padding
:
'
1em
'
,
...
@@ -39,24 +27,14 @@ function SignupComp() {
...
@@ -39,24 +27,14 @@ function SignupComp() {
padding
:
'
1rem
'
padding
:
'
1rem
'
}
}
const
aftershow
=
{
display
:
'
none
'
}
const
initValues
=
{
const
initValues
=
{
email
:
''
email
:
''
,
name
:
''
}
}
const
[
formValues
,
setFormValues
]
=
useState
(
initValues
)
const
[
formValues
,
setFormValues
]
=
useState
(
initValues
)
const
[
formError
,
setFormError
]
=
useState
({})
const
[
validated
,
setValidated
]
=
useState
(
false
)
const
[
validated
,
setValidated
]
=
useState
(
false
)
function
submitForm
()
{
console
.
log
(
'
formValues
'
,
formValues
);
console
.
log
(
!
formValues
[
'
username
'
]);
console
.
log
(
'
Error
'
,
formError
)
}
function
handleChange
(
event
)
{
function
handleChange
(
event
)
{
const
{
name
,
value
}
=
event
.
target
const
{
name
,
value
}
=
event
.
target
setFormValues
({
...
formValues
,
[
name
]:
value
})
setFormValues
({
...
formValues
,
[
name
]:
value
})
...
@@ -78,9 +56,6 @@ function SignupComp() {
...
@@ -78,9 +56,6 @@ function SignupComp() {
// setFormError(validate(formValues))
// setFormError(validate(formValues))
// setIsSubmit(true)
// setIsSubmit(true)
}
}
const
[
emailSubm
,
setEmailSubm
]
=
useState
(
false
)
const
[
emailSubm
,
setEmailSubm
]
=
useState
(
false
)
function
handleClickSubm
()
{
function
handleClickSubm
()
{
...
@@ -92,7 +67,7 @@ function SignupComp() {
...
@@ -92,7 +67,7 @@ function SignupComp() {
}
}
console
.
log
(
emailSubm
);
//
console.log(emailSubm);
return
(
return
(
...
@@ -109,7 +84,21 @@ function SignupComp() {
...
@@ -109,7 +84,21 @@ function SignupComp() {
<
Card
.
Text
>
<
Card
.
Text
>
<
Form
style
=
{
inboxstyled
}
<
Form
style
=
{
inboxstyled
}
onSubmit
=
{
handleSubmit
}
>
onSubmit
=
{
handleSubmit
}
>
<
Form
.
Group
controlId
=
"
userEmail
"
className
=
'
mb-1
'
>
<
Form
.
Group
controlId
=
"
userEmail
"
>
<
Row
className
=
'
m-auto mb-1 d-flex justify-content-center
'
>
<
Form
.
Control
type
=
"
text
"
name
=
"
name
"
placeholder
=
"
Name
"
value
=
{
formValues
.
name
}
onChange
=
{
handleChange
}
// readOnly={emailSubm}
required
/>
<
/Row
>
<
Row
>
<
p
><
/p
>
<
/Row
>
<
Row
className
=
'
m-auto d-flex justify-content-center
'
>
<
Row
className
=
'
m-auto d-flex justify-content-center
'
>
<
Form
.
Control
<
Form
.
Control
type
=
"
email
"
type
=
"
email
"
...
@@ -121,6 +110,7 @@ function SignupComp() {
...
@@ -121,6 +110,7 @@ function SignupComp() {
required
required
/>
/>
<
/Row
>
<
/Row
>
<
/Form.Group
>
<
/Form.Group
>
...
...
client/src/components/TimeNow.js
View file @
07a9f48d
import
React
,
{
Component
}
from
'
react
'
;
import
React
from
'
react
'
;
import
{
Jumbotron
,
Container
,
Row
,
Card
}
from
'
react-bootstrap
'
;
import
{
Row
,
Card
}
from
'
react-bootstrap
'
;
import
Clock
from
'
react-live-clock
'
import
Clock
from
'
react-live-clock
'
import
'
../App.css
'
import
'
../App.css
'
...
...
client/src/pages/Home.js
View file @
07a9f48d
import
React
,
{
useState
,
useEffect
}
from
'
react
'
import
React
from
'
react
'
import
{
Container
,
Row
,
Col
,
Button
}
from
'
react-bootstrap
'
;
import
{
Container
,
Row
,
Col
}
from
'
react-bootstrap
'
;
import
MainLayer
from
'
../components/MainLayer
'
;
import
MainLayer
from
'
../components/MainLayer
'
;
import
TimeNow
from
'
./../components/TimeNow
'
;
import
TimeNow
from
'
./../components/TimeNow
'
;
import
'
../App.css
'
import
'
../App.css
'
...
@@ -7,7 +7,7 @@ import EueSuggest from '../components/EueSuggest';
...
@@ -7,7 +7,7 @@ import EueSuggest from '../components/EueSuggest';
import
ChartLine
from
'
../components/ChartLine
'
;
import
ChartLine
from
'
../components/ChartLine
'
;
import
ChartDoughnut
from
'
../components/ChartDoughnut
'
;
import
ChartDoughnut
from
'
../components/ChartDoughnut
'
;
import
Footer
from
'
./../components/Footer
'
;
import
Footer
from
'
./../components/Footer
'
;
import
db
from
'
../db/index
'
import
axios
from
'
axios
'
;
function
Home
()
{
function
Home
()
{
...
@@ -32,8 +32,12 @@ function Home() {
...
@@ -32,8 +32,12 @@ function Home() {
padding
:
'
0
'
padding
:
'
0
'
}
}
console
.
log
(
db
.
user
.
findAll
())
axios
({
method
:
'
get
'
,
url
:
'
localhost:4500/loccode/doe
'
}).
then
((
res
)
=>
{
console
.
log
(
res
)
})
...
...
client/src/pages/LocalCodePage.js
View file @
07a9f48d
import
React
,
{
useState
,
useEffect
}
from
'
react
'
import
React
from
'
react
'
import
{
Container
,
Row
,
Col
,
Button
}
from
'
react-bootstrap
'
;
import
{
Container
,
Row
,
Col
}
from
'
react-bootstrap
'
;
import
MainLayer
from
'
../components/MainLayer
'
;
import
MainLayer
from
'
../components/MainLayer
'
;
import
'
../App.css
'
import
'
../App.css
'
import
LocCodeChange
from
'
../components/LocCodeChange
'
;
import
LocCodeChange
from
'
../components/LocCodeChange
'
;
...
...
client/src/pages/LoginPage.js
View file @
07a9f48d
import
React
,
{
useState
,
useEffect
}
from
'
react
'
import
React
from
'
react
'
import
{
Container
,
Row
,
Col
,
Button
}
from
'
react-bootstrap
'
;
import
{
Container
,
Row
,
Col
}
from
'
react-bootstrap
'
;
import
MainLayer
from
'
../components/MainLayer
'
;
import
MainLayer
from
'
../components/MainLayer
'
;
import
'
../App.css
'
import
'
../App.css
'
import
LoginComp
from
'
../components/LoginComp
'
;
import
LoginComp
from
'
../components/LoginComp
'
;
...
...
client/src/pages/SignupPage.js
View file @
07a9f48d
import
React
,
{
useState
,
useEffect
}
from
'
react
'
import
React
from
'
react
'
import
{
Container
,
Row
,
Col
,
Button
}
from
'
react-bootstrap
'
;
import
{
Container
,
Row
,
Col
}
from
'
react-bootstrap
'
;
import
MainLayer
from
'
../components/MainLayer
'
;
import
MainLayer
from
'
../components/MainLayer
'
;
import
'
../App.css
'
import
'
../App.css
'
import
SignupComp
from
'
../components/SignupComp
'
;
import
SignupComp
from
'
../components/SignupComp
'
;
...
...
server/package.json
View file @
07a9f48d
...
@@ -18,9 +18,7 @@
...
@@ -18,9 +18,7 @@
},
},
"homepage"
:
"https://github.com/dorakang612/EUE#readme"
,
"homepage"
:
"https://github.com/dorakang612/EUE#readme"
,
"dependencies"
:
{
"dependencies"
:
{
"@babel/core"
:
"^7.11.6"
,
"@babel/cli"
:
"^7.14.5"
,
"@babel/node"
:
"^7.10.5"
,
"@babel/preset-env"
:
"^7.11.5"
,
"body-parser"
:
"^1.19.0"
,
"body-parser"
:
"^1.19.0"
,
"cookie-parser"
:
"^1.4.5"
,
"cookie-parser"
:
"^1.4.5"
,
"dotenv"
:
"^8.2.0"
,
"dotenv"
:
"^8.2.0"
,
...
@@ -37,6 +35,9 @@
...
@@ -37,6 +35,9 @@
"sequelize"
:
"^6.6.5"
"sequelize"
:
"^6.6.5"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"@babel/core"
:
"^7.14.6"
,
"@babel/node"
:
"^7.14.7"
,
"@babel/preset-env"
:
"^7.14.7"
,
"nodemon"
:
"^2.0.4"
"nodemon"
:
"^2.0.4"
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment