-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from punky-lab/yhy-update-12
Yhy update 12
- Loading branch information
Showing
7 changed files
with
43 additions
and
437 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Test Build | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
env: | ||
BASE_URL: https://testing.punky.app/api/v1 | ||
|
||
jobs: | ||
build: | ||
name: Test build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js 20.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Run install | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: install # will run `yarn install` command | ||
|
||
- name: "Create env file" | ||
run: | | ||
touch .env | ||
echo NEXT_PUBLIC_OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }} >> .env | ||
echo NEXT_PUBLIC_APP_PLATFORM=telegram >> .env | ||
echo NEXT_PUBLIC_API_BASE_URL=${{ env.BASE_URL }} >> .env | ||
- name: Build the app | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: build # will run `yarn build` command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,13 @@ | ||
"use client"; | ||
|
||
import Store from "@/components/MainUI/Store"; | ||
import Achieve from "@/components/MainUI/achieve"; | ||
import User from "@/components/MainUI/User"; | ||
import { UIState } from "@/lib/UI"; | ||
import { ReactNode, useCallback, useState } from "react"; | ||
import Wallet from "@/components/MainUI/Wallet"; | ||
import Init from "@/components/MainUI/Init"; | ||
|
||
export default function Home() { | ||
const [currentUI, setCurrentUI] = useState<UIState>("main"); | ||
const popUpClose = useCallback(() => setCurrentUI("main"), []); | ||
|
||
const UIShowing = new Map<UIState, ReactNode>([ | ||
["main", <Init key="main" switchTo={(target) => setCurrentUI(target)} />], | ||
["store", <Store key="store" onClose={popUpClose} />], | ||
["user", <User key="user" onClose={popUpClose} />], | ||
["achieve", <Achieve key="achieve" onClose={popUpClose} />], | ||
["wallet", <Wallet key="wallet" onClose={popUpClose} />] | ||
]); | ||
|
||
return ( | ||
<div className="h-screen w-screen bg-[url('../assets/scenes/main.webp')] bg-cover bg-top text-white overflow-hidden"> | ||
<div className="overflow-y-auto h-full">{UIShowing.get(currentUI)}</div> | ||
<div className="overflow-y-auto h-full"> | ||
<Init /> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.