Skip to content

Commit

Permalink
!8 Fixed compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bokovhu committed May 16, 2024
1 parent 48919d2 commit 41f9334
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 381 deletions.
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions packages/app-game/src/NotABirdApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ import { LandingPage } from "./pages/LandingPage";
import { GamePage } from "./pages/GamePage";
import { FrankPage } from "./pages/FrankPage";
import { GameOverPage } from "./pages/GameOverPage";
import { StarMapPage } from "./pages/StarMapPage";
import { StarSystemPage } from "./pages/StarSystemPage";
import { ItemsWikiPage } from "./pages/ItemsWikiPage";
import { MergicanPage } from "./pages/MergicanPage";

const pages: Array<{ path: string; component: any }> = [
{ path: "/landing-page", component: LandingPage },
{ path: "/star-map", component: StarMapPage },
{ path: "/star-system", component: StarSystemPage },
{ path: "/game", component: GamePage },
{ path: "/game-over", component: GameOverPage },
{ path: "/frank", component: FrankPage },
Expand Down
20 changes: 0 additions & 20 deletions packages/app-game/src/pages/GamePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,15 @@ import { Card } from "../components/Card";
import { Group } from "../components/Group";
import { CenteredLayout } from "../layout/CenteredLayout";
import { GameTutorial } from "../tutorials/GameTutorial";
import { $planetService } from "../service/PlanetService";
import { $starSystemService } from "../service/StarSystemService";

function GameToolbar(
props: {
navigate: (path: string) => void;
}
) {
const [currentPlanetName, setCurrentPlanetName] = useState("");

useEffect(
() => {
const perform = async () => {
const generatedPlanet = await $planetService.getPlanet(
...$starSystemService.selectedPlanetCoordinates
);
setCurrentPlanetName(generatedPlanet.name);
};
perform();
},
[]
);

return <Group>
<Button onClick={() => props.navigate("/items-wiki")}>Items Wiki</Button>
<Button onClick={() => props.navigate("/game-over")}>Give up</Button>
<span className="mx">
{currentPlanetName}
</span>
</Group>
}

Expand Down
2 changes: 1 addition & 1 deletion packages/app-game/src/pages/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CenteredLayout } from "../layout/CenteredLayout";

export function LandingPage(props: { navigate: (path: string) => void }) {
const onStartPlaying = () => {
props.navigate("/star-map");
props.navigate("/game");
};
const goToFrankPage = () => {
props.navigate("/frank");
Expand Down
127 changes: 0 additions & 127 deletions packages/app-game/src/pages/StarMapPage.tsx

This file was deleted.

68 changes: 0 additions & 68 deletions packages/app-game/src/pages/StarSystemPage.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions packages/app-game/src/service/PlanetService.ts

This file was deleted.

38 changes: 0 additions & 38 deletions packages/app-game/src/service/StarMapChangesService.ts

This file was deleted.

42 changes: 0 additions & 42 deletions packages/app-game/src/service/StarMapService.ts

This file was deleted.

Loading

0 comments on commit 41f9334

Please sign in to comment.