Skip to content

Commit

Permalink
Fixed mismatched logic for prefers-reduced-motion (#141)
Browse files Browse the repository at this point in the history
Co-authored-by: Rogin Farrer <rfarrer@wayfair.com>
  • Loading branch information
roginfarrer and Rogin Farrer authored Apr 6, 2023
1 parent 7a5f10c commit 980b971
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .changeset/thirty-rings-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-collapsed': patch
---

Fixed mismatched logic for prefer-reduced-motion
27 changes: 5 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,17 @@ on:

jobs:
release:
name: Publish
name: Publish & Deploy
runs-on: ubuntu-latest
env:
CI: true
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}

steps:
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v2.2.4
with:
version: latest
version: 7.30.3

- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@main
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -31,22 +28,8 @@ jobs:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Setup npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc

- name: setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER

- name: Install Dependencies
run: pnpm i --lockfile-only

- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm i

- name: Create release PR or publish to npm
uses: changesets/action@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function usePrefersReducedMotion() {
setPrefersReducedMotion(mediaQueryList.matches)

const listener = (event: MediaQueryListEvent) => {
setPrefersReducedMotion(!event.matches)
setPrefersReducedMotion(event.matches)
}

mediaQueryList.addEventListener('change', listener)
Expand Down

0 comments on commit 980b971

Please sign in to comment.