From 3db557e2c91c853d73d08a90fb86d69e49d17e9c Mon Sep 17 00:00:00 2001 From: Lyubo Marinov Date: Fri, 14 Apr 2017 13:08:54 -0500 Subject: [PATCH] Move roomnameGenerator.js out of features/base/util Over time features/base/util became a bucket where people seemed to dump just about anything they couldn't think of a better place for. That's a trend I don't like encouraging. Given that roomnameGenerator.js is currently used in features/welcome only, I'm fine with moving it there for the greater good. --- react/features/base/util/index.js | 1 - react/features/welcome/components/AbstractWelcomePage.js | 3 ++- react/features/{base/util => welcome}/roomnameGenerator.js | 2 +- react/features/welcome/route.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename react/features/{base/util => welcome}/roomnameGenerator.js (99%) diff --git a/react/features/base/util/index.js b/react/features/base/util/index.js index 2fe772beb..bce585663 100644 --- a/react/features/base/util/index.js +++ b/react/features/base/util/index.js @@ -1,3 +1,2 @@ export * from './loadScript'; export * from './randomUtil'; -export * from './roomnameGenerator'; diff --git a/react/features/welcome/components/AbstractWelcomePage.js b/react/features/welcome/components/AbstractWelcomePage.js index 0c0e4ce9d..28faba7bc 100644 --- a/react/features/welcome/components/AbstractWelcomePage.js +++ b/react/features/welcome/components/AbstractWelcomePage.js @@ -4,7 +4,8 @@ import { appNavigate } from '../../app'; import { isRoomValid } from '../../base/conference'; import { VideoTrack } from '../../base/media'; import { getLocalVideoTrack } from '../../base/tracks'; -import { generateRoomWithoutSeparator } from '../../base/util'; + +import { generateRoomWithoutSeparator } from '../roomnameGenerator'; /** * Base (abstract) class for container component rendering the welcome page. diff --git a/react/features/base/util/roomnameGenerator.js b/react/features/welcome/roomnameGenerator.js similarity index 99% rename from react/features/base/util/roomnameGenerator.js rename to react/features/welcome/roomnameGenerator.js index 1ae9e976a..59a7fef0b 100644 --- a/react/features/base/util/roomnameGenerator.js +++ b/react/features/welcome/roomnameGenerator.js @@ -1,6 +1,6 @@ /* @flow */ -import { randomElement } from './randomUtil'; +import { randomElement } from '../base/util'; /* const _NOUN_ = [ diff --git a/react/features/welcome/route.js b/react/features/welcome/route.js index 15b4ef601..1ef260d2a 100644 --- a/react/features/welcome/route.js +++ b/react/features/welcome/route.js @@ -1,9 +1,9 @@ /* global APP */ import { RouteRegistry } from '../base/react'; -import { generateRoomWithoutSeparator } from '../base/util'; import { WelcomePage } from './components'; +import { generateRoomWithoutSeparator } from './roomnameGenerator'; /** * Register route for WelcomePage.