Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
kubk committed Nov 21, 2023
1 parent 289fac4 commit 4256367
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions src/screens/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ import { VersionWarning } from "./shared/version-warning.tsx";
import React from "react";
import { UserSettingsStoreProvider } from "../store/user-settings-store-context.tsx";
import { UserSettingsMain } from "./user-settings/user-settings-main.tsx";
import { deckListStore } from "../store/deck-list-store.ts";
import { FullScreenLoader } from "./deck-list/full-screen-loader.tsx";

export const App = observer(() => {
if (deckListStore.isSharedDeckLoading || deckListStore.isDeckRemoving) {
return <FullScreenLoader />;
}

return (
<div>
<VersionWarning />
Expand Down
5 changes: 0 additions & 5 deletions src/screens/deck-list/main-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,12 @@ import WebApp from "@twa-dev/sdk";
import { assert } from "../../lib/typescript/assert.ts";
import { ListHeader } from "../../ui/list-header.tsx";
import { range } from "../../lib/array/range.ts";
import { FullScreenLoader } from "./full-screen-loader.tsx";

export const MainScreen = observer(() => {
useMount(() => {
deckListStore.loadFirstTime(WebApp.initDataUnsafe.start_param);
});

if (deckListStore.isSharedDeckLoading) {
return <FullScreenLoader />;
}

return (
<div
className={css({
Expand Down
1 change: 1 addition & 0 deletions src/store/deck-list-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ export class DeckListStore {

try {
await removeDeckFromMine({ deckId: deck.id });
screenStore.go({ type: "main" });
this.myInfo = fromPromise(myInfoRequest());
} catch (e) {
reportHandledError(`Unable to remove deck ${deck.id}`, e);
Expand Down

0 comments on commit 4256367

Please sign in to comment.