Self-hosted dashboard and admin auth (#4837)

Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
This commit is contained in:
Gabriel Stein
2026-04-23 19:06:36 +05:30
committed by GitHub
co-authored by kartik-mem0
parent 15feaa8ac4
commit db8ac61713
252 changed files with 20275 additions and 331 deletions
@@ -0,0 +1,27 @@
enum LayoutActionConstants {
TOGGLE_SIDEBAR = "TOGGLE_SIDEBAR",
}
interface LayoutState {
isSidebarCollapsed: boolean;
}
const initialState: LayoutState = {
isSidebarCollapsed: false,
};
export const layoutReducer = (
state: LayoutState = initialState,
action: { type: string },
): LayoutState => {
switch (action.type) {
case LayoutActionConstants.TOGGLE_SIDEBAR:
return { ...state, isSidebarCollapsed: !state.isSidebarCollapsed };
default:
return state;
}
};
export const toggleSidebar = () => ({
type: LayoutActionConstants.TOGGLE_SIDEBAR as const,
});
@@ -0,0 +1,8 @@
import { combineReducers } from "redux";
import { layoutReducer } from "./reducers/layoutReducer";
const rootReducer = combineReducers({
layout: layoutReducer,
});
export default rootReducer;
+10
View File
@@ -0,0 +1,10 @@
import { configureStore } from "@reduxjs/toolkit";
import rootReducer from "./rootReducer";
const store = configureStore({
reducer: rootReducer,
});
export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;
export default store;