Skip to content

Commit

Permalink
Fix type of generated flash slice
Browse files Browse the repository at this point in the history
  • Loading branch information
jho406 committed Jan 3, 2025
1 parent ac79a9a commit 91004bd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion superglue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@thoughtbot/superglue",
"version": "0.54.0",
"version": "0.54.0CH",
"description": "Use a vanilla Rails with React and Redux",
"scripts": {
"build": "tsup",
Expand Down
2 changes: 1 addition & 1 deletion superglue_rails/Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
gemspec

gem 'rails', git: 'https://github.com/rails/rails', ref: 'main'
gem 'rails', '~> 7.2.0'
gem 'selenium-webdriver'
gem 'props_template'
gem 'standard'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { createSlice } from "@reduxjs/toolkit";
import { saveResponse, beforeVisit } from "@thoughtbot/superglue";

const initialState: { [name: string]: any } = {};
type FlashState = Record<string, any>

const initialState: FlashState = {};

export const flashSlice = createSlice({
name: "flash",
Expand Down Expand Up @@ -35,7 +37,7 @@ export const flashSlice = createSlice({

return {
...state,
...page.slices.flash,
...(page.slices.flash as FlashState),
};
});
},
Expand Down

0 comments on commit 91004bd

Please sign in to comment.