mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
Add custom CSS (#264)
This commit is contained in:
committed by
GitHub
parent
653e139a9e
commit
d7e7db9f72
29
app/javascript/containers/AppearanceSiteSettings.tsx
Normal file
29
app/javascript/containers/AppearanceSiteSettings.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import AppearanceSiteSettingsP from "../components/SiteSettings/Appearance/AppearanceSiteSettingsP";
|
||||
import { updateTenant } from "../actions/Tenant/updateTenant";
|
||||
import { State } from "../reducers/rootReducer";
|
||||
|
||||
const mapStateToProps = (state: State) => ({
|
||||
areUpdating: state.siteSettings.appearance.areUpdating,
|
||||
error: state.siteSettings.appearance.error,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch: any) => ({
|
||||
updateTenant(
|
||||
customCss: string,
|
||||
authenticityToken: string,
|
||||
): Promise<any> {
|
||||
return dispatch(updateTenant({
|
||||
tenantSetting: {
|
||||
custom_css: customCss,
|
||||
},
|
||||
authenticityToken,
|
||||
}));
|
||||
},
|
||||
});
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(AppearanceSiteSettingsP);
|
||||
Reference in New Issue
Block a user