Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
milanjrodd committed Oct 10, 2023
1 parent b709e62 commit 79ab86d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions apps/frontend/src/components/welcome/welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function Welcome() {
.collection(Collections.Stores)
.getList<StoresResponse>()
.catch(() => {
throw new Error('Не удалось получить список магазинов')
throw new Error('Error while fetching stores')
})

setStores(storesResponse)
Expand All @@ -44,16 +44,21 @@ export function Welcome() {
return (
<div class="flex justify-center flex-col">
<h1 class="text-lg text-center">
Привет, {sdk.initData()?.user?.firstName}!
Hi, {sdk.initData()?.user?.firstName}!
</h1>
<p class="text-sm text-center mt-4 mb-4">
<Show
when={stores().items.length === 0}
fallback="Выберите магазин для редактирования"
fallback={
<div class="text-tg-hint">
Choose a store to edit or create a new one
</div>
}
>
У вас пока нет магазинов
You have no stores yet
</Show>
</p>
<a href="https://t.me/intgmarketbot">Go to marketplace</a>
<div class="flex flex-col">
<For each={stores().items}>
{(store) => (
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/pages/dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function DashboardPage() {

onMount(() => {
sdk.mainButton().on('click', handleCreateStore)
sdk.mainButton().setText('Создать магазин')
sdk.mainButton().setText('Create store')

if (!sdk.mainButton().isVisible) sdk.mainButton().show()
if (sdk.backButton().isVisible) sdk.backButton().hide()
Expand Down

0 comments on commit 79ab86d

Please sign in to comment.