This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2021-01-11T11:57:52.140Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Player extends Component { | |
state = { | |
isMusicPlaying: false, | |
data: [] | |
}; | |
componentDidMount() { | |
axios.defaults.headers.common["Client-ID"] = clientId; | |
axios | |
.get("https://api.twitch.tv/helix/streams?user_login=blaschikovsky") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Player extends Component { | |
state = { | |
isMusicPlaying: false, | |
data: [] | |
}; | |
componentDidMount() { | |
axios.defaults.headers.common["Client-ID"] = clientId; | |
axios | |
.get("https://api.twitch.tv/helix/streams?user_login=blaschikovsky") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
const twitchLive = this.state.data.data; | |
let player; | |
if (twitchLive) { | |
player = ( | |
<div className="PlayerWrapper"> | |
<ReactPlayer | |
url="https://www.youtube.com/watch?v=ysz5S6PUM-U" | |
playing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App extends Component { | |
render() { | |
return ( | |
<div className="App"> | |
<Navigation/> | |
<Switch> | |
<Route path="/about" component={About} /> | |
<Route path="/" exact component={Home} /> | |
</Switch> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from "react"; | |
import { Menu, Icon } from "semantic-ui-react"; | |
import firebase from "../../firebase"; | |
class DirectMessages extends Component { | |
state = { | |
user: this.props.currentUser, | |
users: [], | |
usersRef: firebase.database().ref("user"), | |
connectedRef: firebase.database().ref(".info/connected"), // get ref for the users status information - connected or not |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uploadFile = (file, metadata) => { | |
const pathToUpload = this.state.channel.id; | |
const ref = this.props.messagesRef; | |
const filePath = `chat/public/${uuidv4()}.jpg`; // uuid is a function that creates random string | |
this.setState({ | |
uploadState: 'uploading', | |
uploadTask: this.state.storageRef.child(filePath).put(file,metadata) | |
}, | |
() => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- controller | |
[HttpPost] | |
[ValidateAntiForgeryToken] | |
public ActionResult Create([Bind(Include = "AutomobilId,Marka,Model,ZapreminaMotora,Snaga,Gorivo,Karoserija,urlFotografije,Opis,Cena,Kontakt")] Automobil automobil, | |
HttpPostedFileBase file) | |
{ | |
if (file == null) | |
{ | |
ModelState.AddModelError("file", "niste odabrali sliku"); | |
} |