diff --git a/app/app.tsx b/app/app.tsx index 5bb58c94..f7c63229 100644 --- a/app/app.tsx +++ b/app/app.tsx @@ -15,8 +15,8 @@ import 'babel-core/register' import 'babel-polyfill' // - Import app components -// import Master from 'components/Master' -import { App } from 'components/AWS' +import Master from 'components/Master' +// import { App } from 'components/AWS' // Set default data // tslint:disable-next-line:no-empty @@ -41,8 +41,8 @@ ReactDOM.render( - {/* */} - + + {/* */} , diff --git a/app/factories/index.ts b/app/factories/index.ts index a880daea..9fd05b96 100644 --- a/app/factories/index.ts +++ b/app/factories/index.ts @@ -4,4 +4,4 @@ import { ServiceProvide } from './serviceProvide' export { IServiceProvider, ServiceProvide -} \ No newline at end of file +} diff --git a/app/factories/serviceProvide.ts b/app/factories/serviceProvide.ts index 45375fe1..ba8ccc47 100644 --- a/app/factories/serviceProvide.ts +++ b/app/factories/serviceProvide.ts @@ -16,15 +16,15 @@ import { IVoteService } from 'services/votes' //#region Service implemented classes // - Firebase services -import { AuthorizeService } from 'firebase/firebaseServices/authorize' -import { CircleService } from 'firebase/firebaseServices/circles' -import { CommentService } from 'firebase/firebaseServices/comments' -import { CommonService } from 'firebase/firebaseServices/common' -import { ImageGalleryService } from 'firebase/firebaseServices/imageGallery' -import { NotificationService } from 'firebase/firebaseServices/notifications' -import { PostService } from 'firebase/firebaseServices/posts' -import { UserService } from 'firebase/firebaseServices/users' -import { VoteService } from 'firebase/firebaseServices/votes' +import { AuthorizeService } from 'firebase/services/authorize' +import { CircleService } from 'firebase/services/circles' +import { CommentService } from 'firebase/services/comments' +import { CommonService } from 'firebase/services/common' +import { ImageGalleryService } from 'firebase/services/imageGallery' +import { NotificationService } from 'firebase/services/notifications' +import { PostService } from 'firebase/services/posts' +import { UserService } from 'firebase/services/users' +import { VoteService } from 'firebase/services/votes' //#endregion @@ -111,5 +111,4 @@ export class ServiceProvide implements IServiceProvider { return new VoteService() } - } diff --git a/app/firebase/services/authorize/index.ts b/app/firebase/services/authorize/index.ts index 32dad688..3378979c 100644 --- a/app/firebase/services/authorize/index.ts +++ b/app/firebase/services/authorize/index.ts @@ -2,4 +2,4 @@ import { AuthorizeService } from './AuthorizeService' export { AuthorizeService -} \ No newline at end of file +} diff --git a/app/firebase/services/users/UserService.ts b/app/firebase/services/users/UserService.ts index 2b08487f..e98fad72 100644 --- a/app/firebase/services/users/UserService.ts +++ b/app/firebase/services/users/UserService.ts @@ -50,10 +50,10 @@ export class UserService implements IUserService { usersProfileRef.once('value').then((snapshot: any) => { let usersProfile: any = snapshot.val() || {} let parsedusersProfile: {[userId: string]: Profile} = {} - Object.keys(usersProfile).forEach((userId) => { - if (userId !== userId) { - let userInfo = usersProfile[userId].info - parsedusersProfile[userId] = { + Object.keys(usersProfile).forEach((userKey) => { + if (userId !== userKey) { + let userInfo = usersProfile[userKey].info + parsedusersProfile[userKey] = { avatar: userInfo.avatar, email: userInfo.email, fullName: userInfo.fullName, diff --git a/package.json b/package.json index 932402c0..e17ebd8f 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "babel-core": "^6.24.1", "babel-loader": "^7.1.2", "babel-plugin-transform-decorators-legacy": "^1.3.4", - "babel-polyfill": "^6.26.0", // TODO: Change to babel-plugin-transform-runtime + "babel-polyfill": "^6.26.0", "babel-preset-env": "^1.6.0", "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", diff --git a/tsconfig.json b/tsconfig.json index 906f776a..98042910 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,8 +11,7 @@ "app/*" : ["*"], "domain/*" : ["domain/*"], "factories/*" : ["factories/*"], - "services/*" : ["services/*"], - "firebaseServices/*" : ["firebaseServices/*"] + "firebase/*" : ["firebase/*"] }, "sourceMap": true, // make TypeScript generate sourcemaps "outDir": "public", // output directory to build to (irrelevant because we use Webpack most of the time) diff --git a/webpack.config.js b/webpack.config.js index 60c9e07c..1d295212 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -87,7 +87,7 @@ module.exports = { constants: 'app/constants', services: 'app/services', factories: 'app/factories', - firebaseServices: 'app/firebaseServices', + 'firebase/services': 'app/firebase/services', domain: 'app/domain', api: 'app/api', db: 'app/db',