-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
3,435 additions
and
2,988 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
module.exports = { | ||
presets: [ | ||
['@babel/preset-env', { targets: { node: 'current' } }], | ||
[ | ||
'@babel/preset-typescript', | ||
], | ||
['@babel/preset-typescript'], | ||
'@babel/preset-react', | ||
], | ||
plugins: [ | ||
'@babel/plugin-proposal-class-properties', | ||
], | ||
plugins: ['@babel/plugin-proposal-class-properties'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +0,0 @@ | ||
import { configure } from 'enzyme' | ||
import Adapter from 'enzyme-adapter-react-16' | ||
|
||
// Configure the enzyme adapter. | ||
configure({ adapter: new Adapter() }) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
import { createContext } from 'react' | ||
|
||
export type handlerFunc = (arg?: object) => void | ||
export type listenerFunc = (func: handlerFunc) => void | ||
export type translateFunc = (key: string, ...args: string[]) => string | ||
|
||
export interface I18n { | ||
t: translateFunc | ||
getLang: () => string | ||
setLang: (lang: string) => void | ||
listen: listenerFunc | ||
unlisten: listenerFunc | ||
addLangData: (data: object) => void | ||
_getListenHandlers: () => Array<() => void> | ||
} | ||
|
||
const context = createContext<I18n>(null) | ||
|
||
export default context | ||
import { createContext } from 'react' | ||
|
||
export type handlerFunc = (arg?: object) => void | ||
export type listenerFunc = (func: handlerFunc) => void | ||
export type translateFunc = (key: string, ...args: string[]) => string | ||
|
||
export interface I18n { | ||
t: translateFunc | ||
getLang: () => string | ||
setLang: (lang: string) => void | ||
listen: listenerFunc | ||
unlisten: listenerFunc | ||
addLangData: (data: object) => void | ||
_getListenHandlers: () => Array<() => void> | ||
} | ||
|
||
const context = createContext<I18n>(null) | ||
|
||
export default context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.