Update client dependencies
This commit is contained in:
parent
1794e2680a
commit
508a41ee45
26 changed files with 4998 additions and 5245 deletions
|
@ -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({
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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(
|
||||
{},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue