import {UpdateForm} from "./index"; import {gql, urlUpload, actionPromise, actionGoodCard, getGoods, actionUserFindOne, updateAction} from "../reducers"; import {createStore, combineReducers, applyMiddleware, bindActionCreators} from 'redux'; import { connect } from "react-redux"; import { useEffect, useState, useRef } from "react"; const YourProfile = ({data, getData}) => { useEffect(() => getData('ML'), []) const date = new Date(+data.createdAt); console.log(data) return ( <>

Привіт, {data.nick || "людино"}!

Сторінку створено {`${date.getDate()}. ${date.getMonth() + 1}. ${date.getFullYear()} о ${date.getHours()}: ${date.getMinutes()}: ${date.getSeconds()} `} Пс.. не подобається аватар, логін чи нікнейм? То зміни їх ТИЦ
) } const mapStateToProps = state => ({ state: state, data: state.promiseRed && state.promiseRed.user && state.promiseRed.user.payload && state.promiseRed.user.payload.data && state.promiseRed.user.payload.data.UserFindOne // basket: state.basket, // GoodsArr: arrFromObj(ObjFilter(state.basket, "price")), // order: orderArr(arrFromObj(ObjFilter(state.basket, "price"))), // orderDone: state.promiseRed && state.promiseRed.order && // state.promiseRed.order.payload && // state.promiseRed.order.payload.data.OrderUpsert }); const mapDispatchToProps = dispatch => bindActionCreators({ getData: actionUserFindOne, // onDel: actionCartDelete, // onClear: actionCartClear, // onOrder: actionOrder }, dispatch); const CYourProfile = connect(mapStateToProps, mapDispatchToProps) (YourProfile) export default CYourProfile;