Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 59 additions & 57 deletions samples/BikeSharingApp/BikeSharingWeb/components/Header.js
Original file line number Diff line number Diff line change
@@ -1,62 +1,64 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

import Link from 'next/link'

const Header = (props) => (
<div className="row">
<div className="col"></div>
<div className="col logo">
<Link href="/">
<img src="/static/awc-title.svg" alt="Adventure Works Cycles" />
</Link>
</div>
<div className="col userMenu">
{props.userName != null &&
<span className="userSignOut">
<Link href="/devsignin"><span tabIndex="0">Hi {props.userName} | Sign out</span></Link>
</span>
}
</div>
<style jsx>{`
.row {
background-color: #fff;
min-height: 48px;
box-shadow:0px 2px 10px rgba(65, 65, 65, 0.25);
}

div {
padding: 0;
margin: 0;
}

.userMenu {
padding-top: 13px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: right;
}

.userSignOut {
margin-right: 14px;
margin-left: 10px;
cursor: pointer;
color: #000000;
letter-spacing: 0.05em;
font-size: 16px;
}

.userSignOut:hover {
text-decoration: underline;
}

.logo {
padding-top: 12px;
text-align: center;
}
`}</style>
import Link from "next/link";

const Header = props => (
<div className="row">
<div className="col"></div>
<div className="col logo">
<Link href="/">
<img src="/static/awc-title.svg" alt="Adventure Works Cycles" />
</Link>
</div>
<div className="col userMenu">
{props.userName != null && (
<span className="userSignOut">
<Link href="/devsignin">
<span tabIndex="0">Hi {props.userName} | Sign out in new ver</span>
</Link>
</span>
)}
</div>
)
<style jsx>{`
.row {
background-color: #fff;
min-height: 48px;
box-shadow: 0px 2px 10px rgba(65, 65, 65, 0.25);
}

div {
padding: 0;
margin: 0;
}

.userMenu {
padding-top: 13px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: right;
}

.userSignOut {
margin-right: 14px;
margin-left: 10px;
cursor: pointer;
color: #000000;
letter-spacing: 0.05em;
font-size: 16px;
}

.userSignOut:hover {
text-decoration: underline;
}

.logo {
padding-top: 12px;
text-align: center;
}
`}</style>
</div>
);

export default Header
export default Header;
1 change: 0 additions & 1 deletion samples/BikeSharingApp/Bikes/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ app.get('/api/bikes/:bikeId', function(req, res) {

var theBike = result;
// Hard code image url *FIX ME*
theBike.imageUrl = "/static/logo.svg";
theBike.id = theBike._id;
delete theBike._id;

Expand Down