базовый поиск
This commit is contained in:
20
src/search.js
Normal file
20
src/search.js
Normal file
@ -0,0 +1,20 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
export default class Search extends Component {
|
||||
componentDidMount() {
|
||||
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div className="row">
|
||||
<input type='text' ref='searchInput' onKeyPress={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
window.torrentSocket.emit('search', e.target.value, (torrents) => {
|
||||
console.log(torrents);
|
||||
});
|
||||
}
|
||||
}} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user