Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이준성
/
khuwitch
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
ijunseong
2020-12-08 22:51:58 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8570beb14a9aad80bc0e51888277e2b6aa66c536
8570beb1
1 parent
112e348b
Update: /list api
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
frontend/src/Channel.js
frontend/src/Channel.js
View file @
8570beb
...
...
@@ -68,7 +68,7 @@ export class ChannelList extends React.Component {
]
this
.
state
=
{
channels
:
test
,
channels
:
[]
,
xisPlaying
:
null
,
}
}
...
...
@@ -118,8 +118,27 @@ export class ChannelList extends React.Component {
componentDidMount
()
{
console
.
log
(
'channel cdm'
);
fetch
(
'http://localhost:3303/list'
).
then
(
res
=>
res
.
json
())
.
then
(
data
=>
console
.
log
(
data
))
// 수신 테스트
.
then
(
data
=>
{
var
tmpChannels
=
[]
data
.
channels
.
map
((
channel
,
index
)
=>
{
var
tmp
=
{
id
:
channel
.
id
,
nickname
:
channel
.
nickname
,
category
:
channel
.
category
,
view
:
channel
.
view
,
url
:
`https://www.twitch.tv/
${
channel
.
id
}
`
,
isPlay
:
false
,
}
tmpChannels
.
push
(
tmp
);
})
return
tmpChannels
;
}).
then
(
channels
=>
{
this
.
setState
({
channels
:
channels
,
xisPlaying
:
null
,
})
})
}
render
()
{
...
...
Please
register
or
login
to post a comment