aranja / tux

"Create React App" with SSR and a flexible addon system

Home Page:https://tux.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Initialize management api with locales from server.

eirikurn opened this issue · comments

The management api has a way to get all configured locales for the site. That has a concept of "default locale". We should fetch that when we initialize the management api.

It's possible to abstract this initialisation in different ways. E.g.

async load(...args) {
  const api = await getManagementApi()
  return await api.load(...args)
}