Created
January 19, 2020 12:16
-
-
Save NSLog0/f360d4814ce9b027daf5b0d3760e33fe to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import * as R from 'ramda' | |
const EN_MESSAGE = 'Our website is under renovate, please be patient. We\'ll be back soon' | |
const TH_MESSAGE = 'กำลังปรับปรุงเว็บใหม่' | |
const lang = 'en' | |
const showMessage = R.ifElse( | |
R.propEq('lang', 'en'), | |
() => EN_MESSAGE, | |
() => TH_MESSAGE, | |
); | |
const resp = showMessage({ lang }) | |
console.log(resp) //=> Our website is under renovate, please be patient. We'll be back soon | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment