-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1110 from TomaszKandula/dev
merge: dev to master
- Loading branch information
Showing
10 changed files
with
105 additions
and
45 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
39 changes: 39 additions & 0 deletions
39
TokanPages.ClientApp/src/Pages/DocumentsPage/AboutPage/index.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,39 @@ | ||
import * as React from "react"; | ||
import { useDispatch, useSelector } from "react-redux"; | ||
import Container from "@material-ui/core/Container"; | ||
import { ApplicationState } from "../../../Store/Configuration"; | ||
import { Navigation, Footer } from "../../../Components/Layout"; | ||
import { DocumentContent } from "../../../Components/Document"; | ||
|
||
import { | ||
ContentNavigationAction, | ||
ContentFooterAction, | ||
ContentDocumentAction, | ||
ContentTemplatesAction, | ||
} from "../../../Store/Actions"; | ||
|
||
export const AboutPage = (): JSX.Element => { | ||
const dispatch = useDispatch(); | ||
const language = useSelector((state: ApplicationState) => state.applicationLanguage); | ||
const document = useSelector((state: ApplicationState) => state.contentDocument); | ||
|
||
React.useEffect(() => { | ||
dispatch(ContentNavigationAction.get()); | ||
dispatch(ContentFooterAction.get()); | ||
dispatch(ContentDocumentAction.getAbout()); | ||
dispatch(ContentTemplatesAction.get()); | ||
}, [language?.id]); | ||
|
||
const isLoading = document?.contentAbout?.isLoading ?? false; | ||
const items = document?.contentAbout?.content.items ?? []; | ||
|
||
return ( | ||
<> | ||
<Navigation /> | ||
<Container> | ||
<DocumentContent isLoading={isLoading} items={items} /> | ||
</Container> | ||
<Footer /> | ||
</> | ||
); | ||
}; |
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 |
---|---|---|
|
@@ -18,6 +18,7 @@ export { | |
GuitarPage, | ||
PhotographyPage, | ||
ShowcasePage, | ||
AboutPage, | ||
StoryPage, | ||
PolicyPage, | ||
TermsPage, | ||
|
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
53 changes: 11 additions & 42 deletions
53
TokanPages.ClientApp/src/Store/States/Content/contentDocument.ts
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,49 +1,18 @@ | ||
import { DocumentContentDto } from "../../../Api/Models"; | ||
|
||
interface ContentPolicy extends DocumentContentDto { | ||
isLoading: boolean; | ||
} | ||
|
||
interface ContentTerms extends DocumentContentDto { | ||
isLoading: boolean; | ||
} | ||
|
||
interface ContentStory extends DocumentContentDto { | ||
isLoading: boolean; | ||
} | ||
|
||
interface ContentShowcase extends DocumentContentDto { | ||
isLoading: boolean; | ||
} | ||
|
||
interface ContentBicycle extends DocumentContentDto { | ||
isLoading: boolean; | ||
} | ||
|
||
interface ContentElectronics extends DocumentContentDto { | ||
isLoading: boolean; | ||
} | ||
|
||
interface ContentFootball extends DocumentContentDto { | ||
isLoading: boolean; | ||
} | ||
|
||
interface ContentGuitar extends DocumentContentDto { | ||
isLoading: boolean; | ||
} | ||
|
||
interface ContentPhotography extends DocumentContentDto { | ||
interface DocumentContentProps extends DocumentContentDto { | ||
isLoading: boolean; | ||
} | ||
|
||
export interface ContentDocumentState { | ||
contentPolicy?: ContentPolicy; | ||
contentTerms?: ContentTerms; | ||
contentStory?: ContentStory; | ||
contentShowcase?: ContentShowcase; | ||
contentBicycle?: ContentBicycle; | ||
contentElectronics?: ContentElectronics; | ||
contentFootball?: ContentFootball; | ||
contentGuitar?: ContentGuitar; | ||
contentPhotography?: ContentPhotography; | ||
contentPolicy?: DocumentContentProps; | ||
contentTerms?: DocumentContentProps; | ||
contentAbout?: DocumentContentProps; | ||
contentStory?: DocumentContentProps; | ||
contentShowcase?: DocumentContentProps; | ||
contentBicycle?: DocumentContentProps; | ||
contentElectronics?: DocumentContentProps; | ||
contentFootball?: DocumentContentProps; | ||
contentGuitar?: DocumentContentProps; | ||
contentPhotography?: DocumentContentProps; | ||
} |
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