diff --git a/.github/workflows/deployment.yaml b/.github/workflows/deployment.yaml index e45dbd9..5962401 100644 --- a/.github/workflows/deployment.yaml +++ b/.github/workflows/deployment.yaml @@ -6,6 +6,20 @@ on: - main jobs: + cache: + runs-on: ubuntu-latest + steps: + uses: actions/cache@v3 + with: + path: | + ~/.npm + ${{ github.workspace }}/.next/cache + # Generate a new cache whenever packages or source files change. + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} + # If source files changed but packages didn't, rebuild from a prior cache. + restore-keys: | + ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- + build: runs-on: ubuntu-latest env: diff --git a/src/components/Experiment.tsx b/src/components/Experiment.tsx index 3893585..fd3fdaa 100644 --- a/src/components/Experiment.tsx +++ b/src/components/Experiment.tsx @@ -11,9 +11,7 @@ import Round from "@/components/Round"; import Demographics from "@/components/Demographics"; import Gps from "@/components/Gps"; -import { Phase, GpsQuestion } from "@/utilities/types"; - -import { SessionType } from "@/pages"; +import { Phase, GpsQuestion, SessionType } from "@/utilities/types"; function Experiment({ data }: { data: SessionType }) { const [participant, setParticipant] = useState({}); diff --git a/src/components/Experiment2.tsx b/src/components/Experiment2.tsx index 172c263..d1fe48f 100644 --- a/src/components/Experiment2.tsx +++ b/src/components/Experiment2.tsx @@ -5,17 +5,14 @@ import Intro3 from "./Intro3"; import TopBar from "@/components/TopBar"; import { Participant } from "@prisma/client"; -import { useRef, useState } from "react"; +import { useState } from "react"; -import Round from "@/components/Round"; import Demographics from "@/components/Demographics"; import Gps from "@/components/Gps"; import { Phase, GpsQuestion } from "@/utilities/types"; import Round2 from "./Round2"; -// import { SessionType } from "@/pages"; - function Experiment2() { const [participant, setParticipant] = useState({}); @@ -28,9 +25,8 @@ function Experiment2() { setPhase(Phase.Intro2); } - // const [phase, setPhase] = useState(Phase.Intro); - const [phase, setPhase] = useState(Phase.Main); - // const randomizedDraws = useRef(data.drawn_balls); + const [phase, setPhase] = useState(Phase.Intro); + // const [phase, setPhase] = useState(Phase.Main); const [points, setPoints] = useState(0); const [currentRound, setCurrentRound] = useState(0); const [gpsQuestion, setGpsQuestion] = useState("generalrisk"); diff --git a/src/pages/admin/index.tsx b/src/pages/admin/index.tsx index 4c046b5..1cc3005 100644 --- a/src/pages/admin/index.tsx +++ b/src/pages/admin/index.tsx @@ -246,8 +246,8 @@ export default function Home({ - {/* */} - {/* */} + +