From 8e754765e2d754dcc3eaa08e23c5a8be8839c5a0 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 19 Dec 2019 18:47:11 -0700 Subject: [PATCH] Convert components to ES6 exports --- electron_app/src/updater.js | 3 +-- src/components/views/auth/VectorAuthFooter.js | 7 +++++-- src/components/views/auth/VectorCustomServerDialog.js | 7 +++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/electron_app/src/updater.js b/electron_app/src/updater.js index 49fa4e0419..bd173a90d1 100644 --- a/electron_app/src/updater.js +++ b/electron_app/src/updater.js @@ -18,8 +18,7 @@ function pollForUpdates() { } } -module.exports = {}; -module.exports.start = function startAutoUpdate(updateBaseUrl) { +export function start(updateBaseUrl) { if (updateBaseUrl.slice(-1) !== '/') { updateBaseUrl = updateBaseUrl + '/'; } diff --git a/src/components/views/auth/VectorAuthFooter.js b/src/components/views/auth/VectorAuthFooter.js index 574d71047e..9cebecf9f3 100644 --- a/src/components/views/auth/VectorAuthFooter.js +++ b/src/components/views/auth/VectorAuthFooter.js @@ -20,7 +20,7 @@ import SdkConfig from 'matrix-react-sdk/lib/SdkConfig'; import { _t } from 'matrix-react-sdk/lib/languageHandler'; -module.exports = () => { +const VectorAuthFooter = () => { const brandingConfig = SdkConfig.get().branding; let links = [ {"text": "blog", "url": "https://medium.com/@RiotChat"}, @@ -48,4 +48,7 @@ module.exports = () => { ); }; -module.exports.replaces = 'AuthFooter'; + +VectorAuthFooter.replaces = 'AuthFooter'; + +export default VectorAuthFooter; diff --git a/src/components/views/auth/VectorCustomServerDialog.js b/src/components/views/auth/VectorCustomServerDialog.js index 8843ce6f1c..297caca643 100644 --- a/src/components/views/auth/VectorCustomServerDialog.js +++ b/src/components/views/auth/VectorCustomServerDialog.js @@ -22,7 +22,7 @@ import { _t } from 'matrix-react-sdk/lib/languageHandler'; * This is identical to `CustomServerDialog` except for replacing "this app" * with "Riot". */ -module.exports = ({onFinished}) => { +const VectorCustomServerDialog = ({onFinished}) => { return (
@@ -44,4 +44,7 @@ module.exports = ({onFinished}) => {
); }; -module.exports.replaces = 'CustomServerDialog'; + +VectorCustomServerDialog.replaces = 'CustomServerDialog'; + +export default VectorCustomServerDialog;