Skip to content

Commit

Permalink
Fixed usePage() call
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet committed Oct 4, 2024
1 parent aec8933 commit fbf11ff
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions:
jobs:
eslint:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[only-tests]') && !contains(github.event.head_commit.message, '[only-dusk]')"
if: "!contains(github.event.head_commit.message, '[only-tests]') && !contains(github.event.head_commit.message, '[only-dusk]') && !contains(github.event.head_commit.message, '[ci-skip]') && !contains(github.event.head_commit.message, '[skip-ci]')"

timeout-minutes: 5

Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: true
matrix:
stack: [vue]
stack: [react, vue]

name: Tests

Expand Down Expand Up @@ -72,15 +72,18 @@ jobs:
- name: Build React library
if: ${{ matrix.stack == 'react' }}
run: |
cd react
cd vue
npm install
# we need eslint-plugin-vue for files like helpers.js
cd ../react
npm install
npm run build
- name: Test React library
if: ${{ matrix.stack == 'react' }}
run: |
cd react
npm run test
# - name: Test React library
# if: ${{ matrix.stack == 'react' }}
# run: |
# cd react
# npm run test

- name: Build Vue library
if: ${{ matrix.stack == 'vue' }}
Expand Down
4 changes: 2 additions & 2 deletions react/src/ModalRoot.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react'
import { default as Axios } from 'axios'
import { except, only } from './helpers'
import { router, usePage } from '@inertiajs/react'
import { router } from '@inertiajs/react'
import { mergeDataIntoQueryString } from '@inertiajs/core'
import { createContext, useContext } from 'react'
import ModalRenderer from './ModalRenderer'
Expand Down Expand Up @@ -214,7 +214,7 @@ export const ModalStackProvider = ({ children }) => {
Accept: 'text/html, application/xhtml+xml',
'X-Requested-With': 'XMLHttpRequest',
'X-Inertia': true,
// 'X-Inertia-Version': usePage().version,
'X-Inertia-Version': router.page.version,
'X-InertiaUI-Modal': true,
},
})
Expand Down

0 comments on commit fbf11ff

Please sign in to comment.