diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5029a21 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: Test + +on: + push: + branches: [master] + pull_request: + +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "16.x" + - name: Install dependencies + run: npm ci + - name: Run next.js build + run: npm run build diff --git a/pages/index.tsx b/pages/index.tsx index ae7966e..410f0be 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,10 +1,10 @@ -import { useAtom, atom, PrimitiveAtom } from "jotai"; +import { useAtom } from "jotai"; import type { NextPage } from "next"; import { useEffect, useRef } from "react"; import { SyntheticEvent, useState } from "react"; import { Form } from "react-bootstrap"; import NumberEditBox from "../components/NumberEditBox"; -import ReceiptItem, { IReceiptItem } from "../components/ReceiptItem"; +import ReceiptItem from "../components/ReceiptItem"; import { moneyFormatter } from "../lib/formatter"; import { ParsedInputDisplay } from "../lib/parseInput"; import { @@ -51,7 +51,7 @@ const Home: NextPage = () => { if (isAddCalled.current) { updateDb(); } - }, [receiptJSONString]); + }, [receiptJSONString, receiptJson]); return (