mirror of
https://github.com/jlengrand/adyen-web-demo.git
synced 2026-03-10 08:01:24 +00:00
fix store error and fix typescript error client
This commit is contained in:
@@ -2,7 +2,7 @@ import { Route, Routes } from 'react-router-dom';
|
||||
import { PaymentsFormProps } from './types';
|
||||
import { PaymentsForm, ComponentBase } from '.';
|
||||
|
||||
const ApplicationRouter = ({ options, onSubmit, onChange }: PaymentsFormProps) => {
|
||||
const ApplicationRouter = ({ options, onSubmit, onChange }: any) => {
|
||||
return (
|
||||
<Routes>
|
||||
<Route path="/" element={<PaymentsForm options={options} onSubmit={onSubmit} onChange={onChange} />} />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { PaymentsFormProps } from '../types';
|
||||
|
||||
const PaymentsForm = ({ options: { value, currency, countryCode, component }, onSubmit, onChange }: PaymentsFormProps) => {
|
||||
const PaymentsForm = ({ options: { value, currency, countryCode, component }, onSubmit, onChange }: any) => {
|
||||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
onSubmit();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { configureStore } from '@reduxjs/toolkit';
|
||||
import { reducers } from './app';
|
||||
import { userReducer, configurationReducer } from './app';
|
||||
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
user: reducers.userReducer,
|
||||
configuration: reducers.configurationReducer
|
||||
user: userReducer,
|
||||
configuration: configurationReducer
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user