Update client dependencies

This commit is contained in:
Ken-Håvard Lieng 2020-04-30 07:54:30 +02:00
parent 1794e2680a
commit 508a41ee45
26 changed files with 4998 additions and 5245 deletions

View file

@ -82,7 +82,10 @@ describe('message reducer', () => {
server: 'srv',
tab: '#chan1',
prepend: true,
messages: [{ id: 1, date: new Date() }, { id: 2, date: new Date() }]
messages: [
{ id: 1, date: new Date() },
{ id: 2, date: new Date() }
]
});
expect(state).toMatchObject({

View file

@ -91,18 +91,14 @@ export function compareUsers(a, b) {
export const getChannels = state => state.channels;
export const getSortedChannels = createSelector(
getChannels,
channels =>
sortBy(
Object.keys(channels).map(server => ({
address: server,
channels: sortBy(channels[server], channel =>
channel.name.toLowerCase()
)
})),
server => server.address.toLowerCase()
)
export const getSortedChannels = createSelector(getChannels, channels =>
sortBy(
Object.keys(channels).map(server => ({
address: server,
channels: sortBy(channels[server], channel => channel.name.toLowerCase())
})),
server => server.address.toLowerCase()
)
);
export const getSelectedChannel = createSelector(

View file

@ -4,19 +4,16 @@ import * as actions from './actions';
export const getModals = state => state.modals;
export const getHasOpenModals = createSelector(
getModals,
modals => {
const keys = Object.keys(modals);
export const getHasOpenModals = createSelector(getModals, modals => {
const keys = Object.keys(modals);
for (let i = 0; i < keys.length; i++) {
if (modals[keys[i]].isOpen) {
return true;
}
for (let i = 0; i < keys.length; i++) {
if (modals[keys[i]].isOpen) {
return true;
}
return false;
}
);
return false;
});
export default createReducer(
{},