diff --git a/.github/workflows/frontend-pr-checks.yml b/.github/workflows/frontend-pr-checks.yml new file mode 100644 index 0000000000..87e4b931eb --- /dev/null +++ b/.github/workflows/frontend-pr-checks.yml @@ -0,0 +1,38 @@ +name: PR Checks + +on: + pull_request: + +jobs: + frontend-checks: + runs-on: ubuntu-latest + strategy: + matrix: + check: ['style', 'build'] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: yarn install + working-directory: ./frontend + + - name: Run ESLint + if: matrix.check == 'style' + run: yarn lint + working-directory: ./frontend + + - name: Run Prettier check + if: matrix.check == 'style' + run: yarn prettier --check . + working-directory: ./frontend + + - name: Build + if: matrix.check == 'build' + run: yarn build + working-directory: ./frontend \ No newline at end of file diff --git a/.github/workflows/pr-build-check.yml b/.github/workflows/pr-build-check.yml deleted file mode 100644 index a870a67a91..0000000000 --- a/.github/workflows/pr-build-check.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: PR Build Check - -on: - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - - - name: Install dependencies - run: yarn install - working-directory: ./frontend - - - name: Build - run: yarn build - working-directory: ./frontend \ No newline at end of file diff --git a/frontend/components/questions/questions-listing.tsx b/frontend/components/questions/questions-listing.tsx index b5ef71caf9..e798c2bcb1 100644 --- a/frontend/components/questions/questions-listing.tsx +++ b/frontend/components/questions/questions-listing.tsx @@ -78,7 +78,7 @@ export default function QuestionListing() { ); - } + }; const handleFileSelect = (event: ChangeEvent) => { const file = event.target.files?.[0]; @@ -213,9 +213,7 @@ export default function QuestionListing() { -
- {createNewQuestion()} -
+
{createNewQuestion()}
)} ); -} \ No newline at end of file +}