Skip to content

Commit

Permalink
Merge pull request #1011 from brave/remove-babel
Browse files Browse the repository at this point in the history
webui generates es2017 output and removes confusing babel config
  • Loading branch information
petemill committed Dec 13, 2018
1 parent dfa05d9 commit a35a3e3
Show file tree
Hide file tree
Showing 8 changed files with 141 additions and 973 deletions.
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

12 changes: 8 additions & 4 deletions components/brave_rewards/resources/ui/components/pageWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import * as utils from '../utils'
import WalletOff from 'brave-ui/features/rewards/walletOff'
import ModalAddFunds from 'brave-ui/features/rewards/modalAddFunds'

import clipboardCopy = require('clipboard-copy')
const clipboardCopy = require('clipboard-copy')

interface State {
activeTabId: number
Expand Down Expand Up @@ -74,10 +74,14 @@ class PageWallet extends React.Component<Props, State> {
})
}

onModalBackupOnCopy = (backupKey: string) => {
const success = clipboardCopy(backupKey)
onModalBackupOnCopy = async (backupKey: string) => {
// TODO(jsadler) possibly flash a message that copy was completed
console.log(success ? 'Copy successful' : 'Copy failed')
try {
await clipboardCopy(backupKey)
console.log('Copy successful')
} catch (e) {
console.log('Copy failed')
}
}

onModalBackupOnPrint = (backupKey: string) => {
Expand Down
1 change: 0 additions & 1 deletion components/common/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ export const getLocale = (key: string, replacements?: Record<string, string>) =>
return returnVal
}

module.exports = { getLocale }
8 changes: 0 additions & 8 deletions components/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ module.exports = (env, argv) => ({
test: /\.tsx?$/,
loader: 'awesome-typescript-loader'
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['react-optimize']
}
},
{
test: /\.less$/,
loader: 'style-loader!css-loader?-minimize!less-loader'
Expand Down
Loading

0 comments on commit a35a3e3

Please sign in to comment.