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
search-page
Commits
d88a9d19
Commit
d88a9d19
authored
Jan 20, 2021
by
Lee SeoYeon
Browse files
.
parent
78a75bc6
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
client/.eslintcache
View file @
d88a9d19
This diff is collapsed.
Click to expand it.
client/src/Bookmark.js
View file @
d88a9d19
...
@@ -2,43 +2,40 @@ import React, { useState, useEffect } from 'react'
...
@@ -2,43 +2,40 @@ import React, { useState, useEffect } from 'react'
import
{
Alert
,
Col
,
Card
,
Container
,
Form
,
Row
,
Button
,
Nav
,
Navbar
,
ListGroup
,
Image
,
Table
}
from
"
react-bootstrap
"
import
{
Alert
,
Col
,
Card
,
Container
,
Form
,
Row
,
Button
,
Nav
,
Navbar
,
ListGroup
,
Image
,
Table
}
from
"
react-bootstrap
"
import
axios
from
"
axios
"
import
axios
from
"
axios
"
import
{
Redirect
}
from
'
react-router-dom
'
import
{
Redirect
}
from
'
react-router-dom
'
// import ohuhsm from "./ohuh-sm.PNG";
// function addFavorite() {
// const title = document.title
// const url = location.href
// if (window.sidebar && window.sidebar.addPanel) {
// window.sidebar.addPanel(title, url, "")
// } else if (window.opera && window.print) {
// const elem = document.createElement('a');
// elem.setAttribute('href', url);
// elem.setAttribute('title', title);
// elem.setAttribute('rel', 'sidebar');
// elem.click();
// } else if (document.all) { //msie
// window.external.AddFavorite(url, title);
// } else {
// alert("해당브라우저는 즐겨찾기 추가기능이 지원되지 않습니다.\n\n수동으로 즐겨찾기에 추가해주세요.");
// return true;
// }
// return (
// <Container>
// <Col>
// </Col>
// </Container>
// )
// }
function
Bookmark
()
{
function
Bookmark
()
{
const
[
index
,
setIndex
]
=
useState
(
1
);
// function addFavorite() {
const
[
showSet
,
setShowSet
]
=
useState
([
false
,
false
,
false
,
false
]);
// const title = document.title
const
url
=
[{
// const url = window.location.href
urlname
:
"
북마크이름
"
,
// if (window.sidebar && window.sidebar.addPanel) {
urlpage
:
"
안녕하세요
"
,
// window.sidebar.addPanel(title, url, "")
// } else if (window.opera && window.print) {
// const elem = document.createElement('a');
// elem.setAttribute('href', url);
// elem.setAttribute('title', title);
// elem.setAttribute('rel', 'sidebar');
// elem.click();
// } else if (document.all) { //msie
// window.external.AddFavorite(url, title);
// } else {
// alert("해당브라우저는 즐겨찾기 추가기능이 지원되지 않습니다.\n\n수동으로 즐겨찾기에 추가해주세요.");
// return true;
// }
// }
// const [index, setIndex] = useState(1);
// const [showSet, setShowSet] = useState([false, false, false, false]);
const
add_Page
=
[{
title
:
'
즐겨찾기1
'
,
url
:
'
http://localhost:3000
'
,
},
{
title
:
'
즐겨찾기2
'
,
url
:
'
https://www.naver.com/
'
,
},
{
title
:
'
즐겨찾기3
'
,
url
:
'
https://www.youtube.com/watch?v=wo46N-LQK7o
'
}]
}]
// const addPlace = addFavorite(add_Page)
return
(
return
(
<
Container
>
<
Container
>
...
@@ -54,14 +51,8 @@ function Bookmark() {
...
@@ -54,14 +51,8 @@ function Bookmark() {
<
/Navbar
>
<
/Navbar
>
<
Form
>
<
Form
>
<
ListGroup
>
<
ListGroup
>
<
Row
>
{
url
.
urlname
}
<
/Row
>
<
ListGroup
.
Item
action
href
=
"
/
"
>
북마크1
<
/ListGroup.Item
>
<
ListGroup
.
Item
action
href
=
"
/
"
>
북마크1
<
/ListGroup.Item
>
<
ListGroup
.
Item
>
북마크2
<
/ListGroup.Item
>
<
ListGroup
.
Item
>
북마크2
<
/ListGroup.Item
>
<
ListGroup
.
Item
>
북마크3
<
/ListGroup.Item
>
<
ListGroup
.
Item
>
북마크4
<
/ListGroup.Item
>
<
ListGroup
.
Item
>
북마크5
<
/ListGroup.Item
>
<
ListGroup
.
Item
>
북마크6
<
/ListGroup.Item
>
<
ListGroup
.
Item
>
북마크7
<
/ListGroup.Item
>
<
/ListGroup
>
<
/ListGroup
>
<
/Form
>
<
/Form
>
<
/Container
>
<
/Container
>
...
...
server/models/User.js
View file @
d88a9d19
import
mongoose
from
"
mongoose
"
;
import
mongoose
,
{
isValidObjectId
}
from
"
mongoose
"
;
const
{
String
}
=
mongoose
.
Schema
.
Types
const
{
String
}
=
mongoose
.
Schema
.
Types
...
@@ -23,12 +23,9 @@ const UserSchema = new mongoose.Schema({
...
@@ -23,12 +23,9 @@ const UserSchema = new mongoose.Schema({
default
:
'
user
'
,
default
:
'
user
'
,
enum
:
[
'
user
'
,
'
admin
'
,
'
root
'
]
enum
:
[
'
user
'
,
'
admin
'
,
'
root
'
]
},
},
avatarUrl
:
{
// avatarUrl: {
type
:
String
// type:
},
// },
galleryUrls
:
{
type
:
[
String
]
}
},
{
},
{
timestamps
:
true
timestamps
:
true
})
})
...
...
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