diff options
Diffstat (limited to 'application/components/github/storage.js')
-rw-r--r-- | application/components/github/storage.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/application/components/github/storage.js b/application/components/github/storage.js new file mode 100644 index 0000000..87603a0 --- /dev/null +++ b/application/components/github/storage.js @@ -0,0 +1,18 @@ +const REPOSITORY = 'selectedGithubRepository' +const BRANCH = 'selectedGithubBranch' + +export function getPersistedRepository() { + return JSON.parse(localStorage.getItem(REPOSITORY)) +} + +export function setPersistedRepository(repository) { + localStorage.setItem(REPOSITORY, JSON.stringify(repository)) +} + +export function getPersistedBranch() { + return JSON.parse(localStorage.getItem(BRANCH)) +} + +export function setPersistedBranch(branch) { + localStorage.setItem(BRANCH, JSON.stringify(branch)) +} |