Skip to content

Commit d1c1753

Browse files
authored
Merge pull request #151 from dzcode-io/impl/128-rename-scene-to-page
Renaming Scenes to Pages
2 parents cd6c2a8 + 76eb496 commit d1c1753

File tree

37 files changed

+99
-99
lines changed

37 files changed

+99
-99
lines changed

data/articles/Test_Article/content.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ import React from "react";
2828
import { Sidebar } from "./sidebar";
2929
import { SidebarTreeItem } from "t9/types/main";
3030
import { connect } from "react-redux";
31-
import { fetchArticlesList } from "t9/apps/main/redux/actions/articles-scene";
32-
import { fetchCurrentArticle } from "t9/apps/main/redux/actions/articles-scene";
31+
import { fetchArticlesList } from "t9/apps/main/redux/actions/articles-page";
32+
import { fetchCurrentArticle } from "t9/apps/main/redux/actions/articles-page";
3333
import { useEffect } from "react";
3434

35-
export const ArticlesScene = (props: ArticlesSceneProps) => {
35+
export const ArticlesPage = (props: ArticlesPageProps) => {
3636
useEffect(() => {
3737
props.fetchArticlesList();
3838
}, []);
@@ -70,13 +70,13 @@ export const ArticlesScene = (props: ArticlesSceneProps) => {
7070
);
7171
};
7272

73-
export interface ArticlesSceneInitialState {
73+
export interface ArticlesPageInitialState {
7474
sidebarTree: SidebarTreeItem[] | null;
7575
expanded: string[];
7676
currentArticle: Article | null;
7777
}
7878

79-
interface ArticlesSceneProps {
79+
interface ArticlesPageProps {
8080
fetchArticlesList: () => void;
8181
fetchCurrentArticle: () => void;
8282
sidebarTree: SidebarTreeItem[] | null;
@@ -85,12 +85,12 @@ interface ArticlesSceneProps {
8585
}
8686

8787
export default connect(
88-
(state: { articlesScene: ArticlesSceneProps }) => ({
89-
...state.articlesScene,
88+
(state: { articlesPage: ArticlesPageProps }) => ({
89+
...state.articlesPage,
9090
}),
9191
(dispatch: any) => ({
9292
fetchArticlesList: () => dispatch(fetchArticlesList()),
9393
fetchCurrentArticle: () => dispatch(fetchCurrentArticle()),
9494
}),
95-
)(ArticlesScene);
95+
)(ArticlesPage);
9696
```

frontend/src/apps/main/entry/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ import { getEnv } from "src/common/utils";
2020
import { mainStore } from "t9/apps/main/redux";
2121
import { render } from "react-dom";
2222

23-
const Landing = lazy(() => import("t9/apps/main/scenes/landing"));
24-
const Articles = lazy(() => import("t9/apps/main/scenes/articles"));
25-
const Projects = lazy(() => import("t9/apps/main/scenes/projects"));
26-
const Learn = lazy(() => import("t9/apps/main/scenes/learn"));
27-
const Faq = lazy(() => import("t9/apps/main/scenes/faq"));
28-
const Contact = lazy(() => import("t9/apps/main/scenes/contact"));
23+
const Landing = lazy(() => import("t9/apps/main/pages/landing"));
24+
const Articles = lazy(() => import("t9/apps/main/pages/articles"));
25+
const Projects = lazy(() => import("t9/apps/main/pages/projects"));
26+
const Learn = lazy(() => import("t9/apps/main/pages/learn"));
27+
const Faq = lazy(() => import("t9/apps/main/pages/faq"));
28+
const Contact = lazy(() => import("t9/apps/main/pages/contact"));
2929

3030
const env = getEnv();
3131

File renamed without changes.

frontend/src/apps/main/scenes/articles/index.tsx renamed to frontend/src/apps/main/pages/articles/index.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import React from "react";
66
import { Sidebar } from "./sidebar";
77
import { SidebarTreeItem } from "t9/types/main";
88
import { connect } from "react-redux";
9-
import { fetchArticlesList } from "t9/apps/main/redux/actions/articles-scene";
10-
import { fetchCurrentArticle } from "t9/apps/main/redux/actions/articles-scene";
9+
import { fetchArticlesList } from "t9/apps/main/redux/actions/articles-page";
10+
import { fetchCurrentArticle } from "t9/apps/main/redux/actions/articles-page";
1111
import { useEffect } from "react";
1212

13-
export const ArticlesScene = (props: ArticlesSceneProps) => {
13+
export const ArticlesPage = (props: ArticlesPageProps) => {
1414
useEffect(() => {
1515
props.fetchArticlesList();
1616
}, []);
@@ -48,13 +48,13 @@ export const ArticlesScene = (props: ArticlesSceneProps) => {
4848
);
4949
};
5050

51-
export interface ArticlesSceneInitialState {
51+
export interface ArticlesPageInitialState {
5252
sidebarTree: SidebarTreeItem[] | null;
5353
expanded: string[];
5454
currentArticle: Article | null;
5555
}
5656

57-
interface ArticlesSceneProps {
57+
interface ArticlesPageProps {
5858
fetchArticlesList: () => void;
5959
fetchCurrentArticle: () => void;
6060
sidebarTree: SidebarTreeItem[] | null;
@@ -63,11 +63,11 @@ interface ArticlesSceneProps {
6363
}
6464

6565
export default connect(
66-
(state: { articlesScene: ArticlesSceneProps }) => ({
67-
...state.articlesScene,
66+
(state: { articlesPage: ArticlesPageProps }) => ({
67+
...state.articlesPage,
6868
}),
6969
(dispatch: any) => ({
7070
fetchArticlesList: () => dispatch(fetchArticlesList()),
7171
fetchCurrentArticle: () => dispatch(fetchCurrentArticle()),
7272
}),
73-
)(ArticlesScene);
73+
)(ArticlesPage);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)