refactor: make app more brainding-agnostic and change page title depending on selected channel
This commit is contained in:
parent
8b2dfa92d9
commit
6121f3f1bf
4 changed files with 8 additions and 7 deletions
|
@ -3,10 +3,10 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Brainlet</title>
|
||||
<title>app</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>Sorry, but JavaScript is required to render and interact with this page.</noscript>
|
||||
<noscript>Sorry, but JavaScript is required to use this app.</noscript>
|
||||
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"short_name": "Brainlet",
|
||||
"name": "Brainlet",
|
||||
"short_name": "waffle",
|
||||
"name": "waffle",
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
"theme_color": "#22232b",
|
||||
"background_color": "#22232b"
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ const ChannelView = ({ messages, channel, channelPresenceClientList }) => {
|
|||
if (!channel) return;
|
||||
|
||||
dispatch({ type: 'channels/selectchannel', channelId: channel._id });
|
||||
document.title = `#${channel.title}`;
|
||||
}, [dispatch, channel]);
|
||||
|
||||
if (channel) {
|
||||
|
|
|
@ -110,6 +110,6 @@ const getCreateChannelError = (json) => {
|
|||
}
|
||||
};
|
||||
|
||||
const couldNotReach = "Whoops! We couldn't reach Brainlet.";
|
||||
const couldNotReach = "Whoops! We couldn't reach the server.";
|
||||
|
||||
module.exports = { couldNotReach, getLoginMessageFromError, getSignupMessageFromError, getCreatePostError, getCreateChannelError }
|
Loading…
Reference in a new issue