-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add articles \ articles details page
- Loading branch information
Showing
18 changed files
with
133 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ArticlesDetailsPageAsync } from './ui/ArticlesDetailsPage.async'; | ||
|
||
export { | ||
ArticlesDetailsPageAsync as ArticlesDetailsPage, | ||
}; |
7 changes: 7 additions & 0 deletions
7
src/pages/ArticlesDetailsPage/ui/ArticlesDetailsPage.async.tsx
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,7 @@ | ||
import { lazy } from 'react'; | ||
|
||
export const ArticlesDetailsPageAsync = lazy(() => new Promise((resolve) => { | ||
// @ts-ignore | ||
// ТАК В РЕАЛЬНЫХ ПРОЕКТАХ НЕ ДЕЛАТЬ!!!!! ДЕЛАЕМ ДЛЯ КУРСА! | ||
setTimeout(() => resolve(import('./ArticlesDetailsPage')), 1500); | ||
})); |
16 changes: 16 additions & 0 deletions
16
src/pages/ArticlesDetailsPage/ui/ArticlesDetailsPage.stories.tsx
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,16 @@ | ||
import React from 'react'; | ||
import { ComponentStory, ComponentMeta } from '@storybook/react'; | ||
import { ArticlesDetailsPage } from 'pages/ArticlesDetailsPage'; | ||
|
||
export default { | ||
title: 'shared/ArticlesDetailsPage', | ||
component: ArticlesDetailsPage, | ||
argTypes: { | ||
backgroundColor: { control: 'color' }, | ||
}, | ||
} as ComponentMeta<typeof ArticlesDetailsPage>; | ||
|
||
const Template: ComponentStory<typeof ArticlesDetailsPage> = (args) => <ArticlesDetailsPage {...args} />; | ||
|
||
export const Normal = Template.bind({}); | ||
Normal.args = {}; |
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,8 @@ | ||
import { useTranslation } from 'react-i18next'; | ||
import { memo } from 'react'; | ||
|
||
const ArticlesDetailsPage = (props: any) => { | ||
const { t } = useTranslation(); | ||
return <div>{t('articles_details page')}</div>; | ||
}; | ||
export default memo(ArticlesDetailsPage); |
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,5 @@ | ||
import { ArticlesPageAsync } from './ui/ArticlesPage.async'; | ||
|
||
export { | ||
ArticlesPageAsync as ArticlesPage, | ||
}; |
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,7 @@ | ||
import { lazy } from 'react'; | ||
|
||
export const ArticlesPageAsync = lazy(() => new Promise((resolve) => { | ||
// @ts-ignore | ||
// ТАК В РЕАЛЬНЫХ ПРОЕКТАХ НЕ ДЕЛАТЬ!!!!! ДЕЛАЕМ ДЛЯ КУРСА! | ||
setTimeout(() => resolve(import('./ArticlesPage')), 1500); | ||
})); |
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,16 @@ | ||
import React from 'react'; | ||
import { ComponentStory, ComponentMeta } from '@storybook/react'; | ||
import { ArticlesPage } from 'pages/ArticlesPage'; | ||
|
||
export default { | ||
title: 'shared/ArticlesPage', | ||
component: ArticlesPage, | ||
argTypes: { | ||
backgroundColor: { control: 'color' }, | ||
}, | ||
} as ComponentMeta<typeof ArticlesPage>; | ||
|
||
const Template: ComponentStory<typeof ArticlesPage> = (args) => <ArticlesPage {...args} />; | ||
|
||
export const Normal = Template.bind({}); | ||
Normal.args = {}; |
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,9 @@ | ||
import { useTranslation } from 'react-i18next'; | ||
import { memo } from 'react'; | ||
|
||
const ArticlesPage = (props: any) => { | ||
const { t } = useTranslation(); | ||
return <div>{t('articles page')}</div>; | ||
}; | ||
|
||
export default memo(ArticlesPage); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
margin-left: 10px; | ||
display: flex; | ||
align-items: center; | ||
margin-top: 5px; | ||
} | ||
|
||
.link { | ||
|