Skip to content

Commit

Permalink
allows profile image to be local
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchi0104 committed Jul 5, 2020
1 parent d8f2c75 commit e447b2f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/TopBar.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import React from "react";

const TopBar = props => {
const src = "https://www.3dmgame.com/uploads/allimg/140605/255_140605204804_1.jpg"
const imgSrc = src.startsWith("http://") || src.startsWith('https://')
? src
: require("../assets/" + src)
return (
<div className="ui segment">
<div className="ui stackable grid">
<div className="ui two wide column">
<img
style={{borderRadius: "50%"}}
alt="profile_image"
src="https://www.3dmgame.com/uploads/allimg/140605/255_140605204804_1.jpg"
src= {imgSrc}
className="ui tiny image"
/>
</div>
Expand Down

0 comments on commit e447b2f

Please sign in to comment.