WebJamApps/breakpointministries

View on GitHub
src/redux/mapStoreToProps.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
export interface Auth {
  isAuthenticated: boolean,
  error: string,
  email: string,
  token: string,
  user: {
    userType?: string;
  };
}

export interface Iblog {
  _id:string, title:string, body:string, created_at:string, updated_at:string
}
export interface Store {
  auth: Auth;
  blogs: { blogs: Iblog[] };
}

const mapStoreToProps = (store: Store): Record<string, unknown> => ({
  auth: store.auth,
  blogs: store.blogs.blogs,
});
export default mapStoreToProps;