Skip to content

Commit 59e4920

Browse files
committed
Change class names
1 parent 45dd008 commit 59e4920

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

src/components/Article.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export default class Article extends React.Component<ArticleProps, ArticleState>
102102
</div>
103103

104104
<div className="container main">
105-
<WithSidebar className="news">
105+
<WithSidebar>
106106
<Card key={article.id} bordered={false} className="article">
107107
<div
108108
className="markdown-body"

src/components/Home.scss

+9-9
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,19 @@
4747
}
4848
}
4949

50-
.news {
50+
.main-content {
5151
position: relative;
52+
}
5253

53-
.article-card {
54-
margin-bottom: 12px;
54+
.article-card {
55+
margin-bottom: 12px;
5556

56-
.ant-card-head-title {
57-
font-size: 18px;
57+
.ant-card-head-title {
58+
font-size: 18px;
5859

59-
a {
60-
color: inherit;
61-
text-decoration: none;
62-
}
60+
a {
61+
color: inherit;
62+
text-decoration: none;
6363
}
6464
}
6565
}

src/components/Home.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export default class Home extends React.Component<HomeProps, HomeState> {
101101
</div>
102102

103103
<div className="container main">
104-
<WithSidebar className="news">
104+
<WithSidebar>
105105
{this.state.articles && this.state.articles.map((article: Article) => {
106106
return (
107107
<Card

src/components/Join.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class Join extends React.Component<JoinProps, JoinState> {
169169
</div>
170170

171171
<div className="container main">
172-
<WithSidebar className="news">
172+
<WithSidebar>
173173
<Card bordered={false}>
174174
<Form onSubmit={this.onSubmit} className="join-form">
175175
<p>请如实认真地填写该表格,这将有助于我们更好地组织和调配战争资源,为我们共同的目标赢得更大的优势!</p>

src/components/Profile.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class Profile extends React.Component<ProfileProps, ProfileState> {
120120
</div>
121121

122122
<div className="container main">
123-
<WithSidebar className="news profile" sidebar={<ProfileSidebar />}>
123+
<WithSidebar className="profile" sidebar={<ProfileSidebar />}>
124124
{this.state.articles.map((article: Article) => {
125125
const prefix = article.publishedAt.getTime() === 0 ? '[草稿] ' : '';
126126
return (

src/components/parts/WithSidebar.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import DefaultSidebar from './DefaultSidebar';
66
interface WithSidebarProps {
77
children?: React.ReactNode;
88
sidebar?: React.ReactNode;
9-
className: string;
9+
className?: string;
1010
}
1111

1212
const WithSidebar = (props: WithSidebarProps) => (
1313
<Row>
14-
<Col span={16} className={props.className + ' main-content'}>
14+
<Col span={16} className={(props.className || '') + ' main-content'}>
1515
{props.children}
1616
</Col>
1717

0 commit comments

Comments
 (0)