I don't know about how much expected is that behaviour, but i get this result launching the project on volumes attached to a docker container with yarn while, using npm on my local machine env everything goes smooth and working
Might be because of lack of memory, faced a similar issue. Fixed it by increasing the memory and cores I allocate to Docker. It was in 1gb, updated to 4. Things worked fine.
Hi, could you help me to understand how to disable the user auth entangled in your template?
I'm trying to substitute your fake auth with my authentication routine but every time i try to substituite the default login page with mine in the routes, the template forcely redirect me to the dashboard or to a 404 like it didn't find the page (which i can assure follows the right path as much as other routes)
See, after succesfull registartion or login app navigates to root path - yield history.push('/‘)
in src/redux/user/sagas.js
Then src/layouts/index.js
will redirect to login url if user not authorized
if (!isAuthLayout && !isUserAuthorized) {
return <Redirect to="/auth/login" />
}
that was no help
We answered you above - please clarify your question
There is a small UI issue in the dark mode of Vue cleanui template. Enable dark mode in this page: https://vue.cleanui.cloud/#/tables/antd
Click Sort on "Address" cell under Filter and Sort table. Move your mouse elsewhere, you can see the cell background go white. Tried to fix it, couldn't. Please let me know which css property should be edited for fixing this.
when will this be fixed?
import React from 'react'
import Login from 'components/cleanui/system/Auth/Login' // Introduce the corresponding React component
import configureMockStore from 'redux-mock-store'
import { Provider } from 'react-redux'
import { shallowWithIntl, loadTranslationObject } from 'enzyme-react-intl'
import translations from '../../../locales/en-US'
const mockStore = configureMockStore()
// Load in the desired react-intl translation file.
loadTranslationObject(translations)
const store = mockStore({ settings: { authProvider: 'jwt', logo: '' }, user: { loading: false } })
it('renders with Login', () => {
const wrapper = shallowWithIntl(
<Provider store={store}>
<Login />
</Provider>,
) // Rendering
expect(wrapper.find('Login')).to.have.lengthOf(1)
})
it('renders children when passed in', () => {
const wrapper = shallowWithIntl(
<Provider store={store}>
<Login>
<div className="unique" />
</Login>
</Provider>,
)
expect(wrapper.contains(<div className="unique" />)).to.equal(true)
})
`
Unable to right test cases mostly getting these errors :
Output of above code :
Test suite failed to run
/home/rohit/Drive/workspace/pws/pws-ui/node_modules/antd/es/locale/en_US.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import defaultLocale from './default';
^^^^^^
SyntaxError: Cannot use import statement outside a module
> 1 | import localeAntd from 'antd/es/locale/en_US'
| ^
2 |
3 | const messages = {
4 | 'topBar.issuesHistory': 'Issues History',
at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
at Object.<anonymous> (src/locales/en-US.js:1:1)
Can you help because in shallow testing its loading complete main page layout and the main issue was import defaultLocale from './default';
Need help here, because i am not able to write a simple test case, I have also tried these as above :
import React from 'react'
import ReactDOM from 'react-dom'
import { MemoryRouter } from 'react-router-dom'
import Login from 'components/cleanui/system/Auth/Login'
import configureMockStore from 'redux-mock-store'
import { Provider } from 'react-redux'
import { IntlProvider } from 'react-intl'
const mockStore = configureMockStore()
const store = mockStore({ settings: { authProvider: 'jwt', logo: '' }, user: { loading: false } })
const messages = {
'topBar.issuesHistory': 'Issues History',
'topBar.projectManagement': 'Project Management',
'topBar.typeToSearch': 'Search...',
'topBar.findPages': 'Find pages...',
'topBar.actions': 'Actions',
'topBar.status': 'Status',
'topBar.profileMenu.hello': 'Hello',
'topBar.profileMenu.billingPlan': 'Billing Plan',
'topBar.profileMenu.role': 'Role',
'topBar.profileMenu.email': 'Email',
'topBar.profileMenu.phone': 'Phone',
'topBar.profileMenu.editProfile': 'Edit Profile',
'topBar.profileMenu.lockscreen': 'Lockscreen',
'topBar.profileMenu.logout': 'Logout',
'login.login': 'Login',
'login.email': 'E-mail',
'login.password': 'Password',
'login.forgotpassword': 'Forgot Password',
}
it('renders without crashing', () => {
const div = document.createElement('div')
ReactDOM.render(
<IntlProvider locale="en-US" messages={messages}>
<MemoryRouter>
<Provider store={store}>
<Login />
</Provider>
</MemoryRouter>
</IntlProvider>,
div,
)
ReactDOM.unmountComponentAtNode(div)
})
Output :
console.error node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/virtual-console.js:29
Error: Uncaught [TypeError: window.matchMedia is not a function]
at reportException (/home/rohit/Drive/workspace/pws/pws-ui/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:661
please have a look @sellpixels-robot
I think their charts are very comprehensive and modern looking, however I couldn't get it to work with CRA, due to limited knowledge on its configuration
Following up on this, the React mod is released, however the documentation language is in Chinese: https://charts.ant.design/
I guess, Google Translate will serve a good purpose here if you are exploring charts, one of the comprehensive I've found, and it fits well with Clean UI React.
Cheers!