asenka0301/frontend-bootcamp-project-12

View on GitHub
frontend/src/components/modals/index.js

Summary

Maintainability
A
0 mins
Test Coverage
import ChannelModal from './ChannelModal';
import ModalDeleteChannel from './ModalDeleteChannel';
import ModalRenameChannel from './ModalRenameChannel';

const modals = {
  addChannel: ChannelModal,
  deleteChannel: ModalDeleteChannel,
  renameChannel: ModalRenameChannel,
};

export default (modalName) => modals[modalName];