Skip to content

Commit

Permalink
feat(demo): Upgrade to reduxjs toolkit v2 (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
hikerpig authored Jan 5, 2024
1 parent b10f047 commit a7640a4
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 46 deletions.
5 changes: 5 additions & 0 deletions .changeset/short-tables-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'pintora-demo': patch
---

Upgrade to reduxjs toolkit v2
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@pintora/standalone": "workspace:*",
"@pintora/test-shared": "workspace:*",
"@react-hook/debounce": "^4.0.0",
"@reduxjs/toolkit": "^1.8.3",
"@reduxjs/toolkit": "^2.0.0",
"browser-fs-access": "^0.35.0",
"classnames": "^2.3.2",
"daisyui": "^1.22.2",
Expand Down
3 changes: 1 addition & 2 deletions demo/src/live-editor/containers/Preview/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useCallback } from 'react'
import { PintoraConfig } from '@pintora/core'
import type { PintoraConfig, DeepPartial } from '@pintora/core'
import classnames from 'classnames'
import { DeepPartial } from '@reduxjs/toolkit'
import { useDispatch, connect } from 'react-redux'
import { StoreState } from 'src/live-editor/redux/store'
import { actions } from 'src/live-editor/redux/slice'
Expand Down
3 changes: 2 additions & 1 deletion demo/src/live-editor/redux/slice.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { createSlice, DeepPartial, Draft, PayloadAction } from '@reduxjs/toolkit'
import { createSlice, Draft, PayloadAction } from '@reduxjs/toolkit'
import { EXAMPLES } from '@pintora/test-shared'
import type { DeepPartial } from '@pintora/core'
import { PintoraConfig } from '@pintora/standalone'
import { ErrorInfo } from 'src/live-editor/type'
import '@pintora/diagrams'
Expand Down
2 changes: 1 addition & 1 deletion demo/src/live-editor/redux/themeSlice.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createSlice, DeepPartial, Draft, PayloadAction } from '@reduxjs/toolkit'
import { createSlice } from '@reduxjs/toolkit'
import { EXAMPLES } from '@pintora/test-shared'

export type State = {
Expand Down
4 changes: 2 additions & 2 deletions packages/pintora-target-wintercg/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dist/
out-scripts/
build-meta.json
dist
80 changes: 41 additions & 39 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit a7640a4

@vercel
Copy link

@vercel vercel bot commented on a7640a4 Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.