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>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Brainlet</title>
|
<title>app</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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>
|
<div id="root"></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"short_name": "Brainlet",
|
"short_name": "waffle",
|
||||||
"name": "Brainlet",
|
"name": "waffle",
|
||||||
"start_url": ".",
|
"start_url": ".",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"theme_color": "#000000",
|
"theme_color": "#22232b",
|
||||||
"background_color": "#ffffff"
|
"background_color": "#22232b"
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ const ChannelView = ({ messages, channel, channelPresenceClientList }) => {
|
||||||
if (!channel) return;
|
if (!channel) return;
|
||||||
|
|
||||||
dispatch({ type: 'channels/selectchannel', channelId: channel._id });
|
dispatch({ type: 'channels/selectchannel', channelId: channel._id });
|
||||||
|
document.title = `#${channel.title}`;
|
||||||
}, [dispatch, channel]);
|
}, [dispatch, channel]);
|
||||||
|
|
||||||
if (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 }
|
module.exports = { couldNotReach, getLoginMessageFromError, getSignupMessageFromError, getCreatePostError, getCreateChannelError }
|
Loading…
Reference in a new issue