pages/index.tsx
内17行目にある、handleClick
中のrouter.push()
の値を変更することで問題形式を切り替えられます。
const handleClick = () => {
...
router.push('/integral')
}
http://localhost:3000/integral

http://localhost:3000/differential

http://localhost:3000/determinant

-
This is a Next.js project bootstrapped with
create-next-app
. -
環境変数を設定
変数名 | 説明 |
---|---|
TOKEN | https://github.com/OpenWonderLabs/SwitchBotAPI#getting-started |
SECRET | https://github.com/OpenWonderLabs/SwitchBotAPI#getting-started |
DEVICE_ID | SwitchBot Hub 経由の仮想デバイスID |
ALARM_ENV | development , production |
下記コマンドを実行するととりあえず動きます
echo "TOKEN=tokentokentoken" > .env.local && echo "SECRET=secretsecret" >> .env.local && echo "DEVICE_ID=02-00000000" >> .env.local && echo "ALARM_ENV=development" >> .env.local
- 開発サーバーを起動
yarn && yarn dev
Open http://localhost:3000 with your browser to see the result.