-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* apply case-only name changes * commit the new 23.2 version * package name * restore readme and metadata * restore app name and remove NewPage
- Loading branch information
1 parent
4528996
commit 371119c
Showing
44 changed files
with
22,609 additions
and
24,299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
import './matchMediaMock'; | ||
import { render, screen } from '@testing-library/react'; | ||
import App from './App'; | ||
import { act } from 'react-dom/test-utils'; | ||
|
||
test('renders learn react link', () => { | ||
render(<App />); | ||
const linkElement = screen.getByText(/learn react/i); | ||
expect(linkElement).toBeInTheDocument(); | ||
}); | ||
describe("App", () => { | ||
test('renders learn react link', async () => { | ||
await act( async () => { render(<App/>) }); | ||
const linkElement = screen.getByText(/create react app/i); | ||
expect(linkElement).toBeInTheDocument(); | ||
}); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,46 @@ | ||
import React from 'react'; | ||
import { Switch, Route, Redirect } from 'react-router-dom'; | ||
import { Routes, Route, Navigate } from 'react-router-dom'; | ||
import { SingleCard } from './layouts'; | ||
import { LoginForm, ResetPasswordForm, ChangePasswordForm, CreateAccountForm } from './components'; | ||
|
||
export default function () { | ||
export default function UnauthenticatedContent() { | ||
return ( | ||
<Switch> | ||
<Route exact path='/login' > | ||
<SingleCard title="Sign In"> | ||
<LoginForm /> | ||
</SingleCard> | ||
</Route> | ||
<Route exact path='/create-account' > | ||
<SingleCard title="Sign Up"> | ||
<CreateAccountForm /> | ||
</SingleCard> | ||
</Route> | ||
<Route exact path='/reset-password' > | ||
<SingleCard | ||
title="Reset Password" | ||
description="Please enter the email address that you used to register, and we will send you a link to reset your password via Email." | ||
> | ||
<ResetPasswordForm /> | ||
</SingleCard> | ||
</Route> | ||
<Route exact path='/change-password/:recoveryCode' > | ||
<SingleCard title="Change Password"> | ||
<ChangePasswordForm /> | ||
</SingleCard> | ||
</Route> | ||
<Redirect to={'/login'} /> | ||
</Switch> | ||
<Routes> | ||
<Route | ||
path='/login' | ||
element={ | ||
<SingleCard title="Sign In"> | ||
<LoginForm /> | ||
</SingleCard> | ||
} | ||
/> | ||
<Route | ||
path='/create-account' | ||
element={ | ||
<SingleCard title="Sign Up"> | ||
<CreateAccountForm /> | ||
</SingleCard> | ||
} | ||
/> | ||
<Route | ||
path='/reset-password' | ||
element={ | ||
<SingleCard | ||
title="Reset Password" | ||
description="Please enter the email address that you used to register, and we will send you a link to reset your password via Email." | ||
> | ||
<ResetPasswordForm /> | ||
</SingleCard> | ||
} | ||
/> | ||
<Route | ||
path='/change-password/:recoveryCode' | ||
element={ | ||
<SingleCard title="Change Password"> | ||
<ChangePasswordForm /> | ||
</SingleCard> | ||
} | ||
/> | ||
<Route path='*' element={<Navigate to={'/login'} />}></Route> | ||
</Routes> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export default { | ||
title: 'DevExtreme App' | ||
const appInfo = { | ||
title: 'DevExtreme App' | ||
}; | ||
export default appInfo; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
import { withNavigationWatcher } from './contexts/navigation'; | ||
import { HomePage, TasksPage, ProfilePage } from './pages'; | ||
import { withNavigationWatcher } from './contexts/navigation'; | ||
|
||
const routes = [ | ||
{ | ||
path: '/tasks', | ||
component: TasksPage | ||
}, | ||
{ | ||
path: '/profile', | ||
component: ProfilePage | ||
}, | ||
{ | ||
path: '/home', | ||
component: HomePage | ||
} | ||
{ | ||
path: '/tasks', | ||
element: TasksPage | ||
}, | ||
{ | ||
path: '/profile', | ||
element: ProfilePage | ||
}, | ||
{ | ||
path: '/home', | ||
element: HomePage | ||
} | ||
]; | ||
|
||
export default routes.map(route => { | ||
return { | ||
...route, | ||
component: withNavigationWatcher(route.component) | ||
}; | ||
return { | ||
...route, | ||
element: withNavigationWatcher(route.element, route.path) | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
src/components/footer/footer.js → src/components/footer/Footer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import React from 'react'; | ||
import './footer.scss'; | ||
import './Footer.scss'; | ||
|
||
export default ({ ...rest }) => { | ||
export default function Footer({ ...rest }) { | ||
return <footer className={'footer'} {...rest} />; | ||
}; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from 'react'; | ||
import Toolbar, { Item } from 'devextreme-react/toolbar'; | ||
import Button from 'devextreme-react/button'; | ||
import UserPanel from '../user-panel/UserPanel'; | ||
import './Header.scss'; | ||
import { Template } from 'devextreme-react/core/template'; | ||
|
||
|
||
export default function Header({ menuToggleEnabled, title, toggleMenu }) { | ||
return ( | ||
<header className={'header-component'}> | ||
<Toolbar className={'header-toolbar'}> | ||
<Item | ||
visible={menuToggleEnabled} | ||
location={'before'} | ||
widget={'dxButton'} | ||
cssClass={'menu-button'} | ||
> | ||
<Button icon="menu" stylingMode="text" onClick={toggleMenu} /> | ||
</Item> | ||
<Item | ||
location={'before'} | ||
cssClass={'header-title'} | ||
text={title} | ||
visible={!!title} | ||
/> | ||
<Item | ||
location={'after'} | ||
locateInMenu={'auto'} | ||
menuItemTemplate={'userPanelTemplate'} | ||
> | ||
<Button | ||
className={'user-button authorization'} | ||
width={210} | ||
height={'100%'} | ||
stylingMode={'text'} | ||
> | ||
<UserPanel menuMode={'context'} /> | ||
</Button> | ||
</Item> | ||
<Template name={'userPanelTemplate'}> | ||
<UserPanel menuMode={'list'} /> | ||
</Template> | ||
</Toolbar> | ||
</header> | ||
)} |
File renamed without changes.
Oops, something went wrong.