1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-10 12:24:20 +01:00
ipfs-boards/webapp/components/options.jsx

14 lines
300 B
React
Raw Normal View History

module.exports = {
get: function () {
var opt
var s = window.localStorage.getItem('ipfs-boards-settings')
try {
opt = JSON.parse(s)
} catch (e) {
// Do nothing
}
if (opt === null || opt === undefined) opt = { addr: 'localhost', port: 5001 }
return opt
}
}