2016-06-16 11:34:13 +09:00
|
|
|
/*
|
|
|
|
The original Logo components is defined using React's
|
|
|
|
functional stateless component syntax, so we redefine
|
|
|
|
it the same way.
|
|
|
|
*/
|
|
|
|
|
|
|
|
import React from 'react';
|
2016-06-19 16:25:19 +09:00
|
|
|
import { IndexLink } from 'react-router';
|
2016-11-17 20:00:20 +01:00
|
|
|
import Users from 'meteor/nova:users';
|
2016-12-12 11:34:28 +09:00
|
|
|
import { replaceComponent } from 'meteor/nova:core';
|
2016-06-16 11:34:13 +09:00
|
|
|
|
2016-11-17 20:00:20 +01:00
|
|
|
const CustomLogo = ({logoUrl, siteTitle, currentUser}) => {
|
2016-06-16 11:34:13 +09:00
|
|
|
return (
|
2016-11-17 20:00:20 +01:00
|
|
|
<div>
|
|
|
|
<h1 className="logo-text"><IndexLink to="/">⭐{siteTitle}⭐</IndexLink></h1>
|
|
|
|
{ currentUser ? <span className="logo-hello">Welcome {Users.getDisplayName(currentUser)} 👋</span> : null}
|
|
|
|
</div>
|
2016-06-16 11:34:13 +09:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2016-12-12 11:34:28 +09:00
|
|
|
replaceComponent('Logo', CustomLogo);
|