mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
fix merge errors
This commit is contained in:
33
apps/portal/src/app/features/auth/store/signup.slice.ts
Normal file
33
apps/portal/src/app/features/auth/store/signup.slice.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { createSlice, type PayloadAction } from '@reduxjs/toolkit';
|
||||
|
||||
interface SignupState {
|
||||
email: string;
|
||||
phoneNumber: string;
|
||||
step: 'form' | 'otp' | 'complete';
|
||||
}
|
||||
|
||||
const initialState: SignupState = {
|
||||
email: '',
|
||||
phoneNumber: '',
|
||||
step: 'form',
|
||||
};
|
||||
|
||||
const signupSlice = createSlice({
|
||||
name: 'signup',
|
||||
initialState,
|
||||
reducers: {
|
||||
setSignupData(state, action: PayloadAction<{ email: string; phoneNumber: string }>) {
|
||||
state.email = action.payload.email;
|
||||
state.phoneNumber = action.payload.phoneNumber;
|
||||
},
|
||||
setSignupStep(state, action: PayloadAction<SignupState['step']>) {
|
||||
state.step = action.payload;
|
||||
},
|
||||
resetSignup() {
|
||||
return initialState;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { setSignupData, setSignupStep, resetSignup } = signupSlice.actions;
|
||||
export const signupReducer = signupSlice.reducer;
|
||||
@@ -7,7 +7,7 @@ import { PortalLayout } from './layouts/PortalLayout';
|
||||
// Auth (standalone pages, no portal chrome)
|
||||
import { LoginPage } from './features/auth/pages/LoginPage';
|
||||
import { SignupPage } from './features/auth/pages/SignupPage';
|
||||
import { SetPasswordPage } from './features/auth/pages/SetPasswordPage';
|
||||
import { OTPVerificationPage } from './features/auth/pages/OTPVerificationPage';
|
||||
|
||||
// Portal feature pages
|
||||
import { DashboardPage } from './features/dashboard/pages/DashboardPage';
|
||||
@@ -36,7 +36,7 @@ export const router = createBrowserRouter([
|
||||
// Standalone auth pages
|
||||
{ path: '/login', element: <LoginPage /> },
|
||||
{ path: '/signup', element: <SignupPage /> },
|
||||
{ path: '/set-password', element: <SetPasswordPage /> },
|
||||
{ path: '/otp-verify', element: <OTPVerificationPage /> },
|
||||
|
||||
// Portal (open access for this UI template).
|
||||
// Wrapped in the portal's own i18n instance so it is isolated from the
|
||||
|
||||
@@ -2,7 +2,6 @@ import { configureStore } from '@reduxjs/toolkit';
|
||||
import { baseApi } from '@ema-platform/api';
|
||||
import { authReducer } from '../features/auth/store/auth.slice';
|
||||
import { signupReducer } from '../features/auth/store/signup.slice';
|
||||
import { setPasswordReducer } from '../features/auth/store/set-password.slice';
|
||||
import { licensesReducer } from '../features/licenses/store/licenses.slice';
|
||||
import { authStorage } from '../features/auth/utils/auth-storage';
|
||||
|
||||
@@ -19,7 +18,6 @@ export const store = configureStore({
|
||||
reducer: {
|
||||
auth: authReducer,
|
||||
signup: signupReducer,
|
||||
setPassword: setPasswordReducer,
|
||||
licenses: licensesReducer,
|
||||
[baseApi.reducerPath]: baseApi.reducer,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user