You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by hb...@apache.org on 2022/08/23 08:43:43 UTC
[age-website] branch new-web updated: update code refac & config.yml
This is an automated email from the ASF dual-hosted git repository.
hbshin pushed a commit to branch new-web
in repository https://gitbox.apache.org/repos/asf/age-website.git
The following commit(s) were added to refs/heads/new-web by this push:
new dc69bca update code refac & config.yml
dc69bca is described below
commit dc69bcac756793c261388774daf4baed19da6e1f
Author: Hanbyeol Shin / David Shin / 신한별 <76...@users.noreply.github.com>
AuthorDate: Tue Aug 23 17:43:32 2022 +0900
update code refac & config.yml
---
src/components/ProjectList.js | 58 ++++++++++++++++++++++++-------------------
static/admin/config.yml | 4 +--
2 files changed, 34 insertions(+), 28 deletions(-)
diff --git a/src/components/ProjectList.js b/src/components/ProjectList.js
index a36df1e..74b99b4 100644
--- a/src/components/ProjectList.js
+++ b/src/components/ProjectList.js
@@ -5,7 +5,7 @@ import * as styles from './styles/ProjectList.module.scss';
// component
import ProjectDetail from './ProjectDetail';
import { Spin } from 'antd';
-import PerfectScrollbar from 'react-perfect-scrollbar'
+import PerfectScrollbar from 'react-perfect-scrollbar';
import 'react-perfect-scrollbar/dist/css/styles.css';
const ProjectList = ({ mode }) => {
@@ -34,14 +34,12 @@ const ProjectList = ({ mode }) => {
return (
<>
-
{isLoading ? (
<p style={{ textAlign: 'center' }}>
<Spin></Spin>
</p>
) : (
-
- <PerfectScrollbar >
+ <PerfectScrollbar>
<ul className={styles.cardRoot}>
{projects?.map((item) => (
<li>
@@ -50,7 +48,6 @@ const ProjectList = ({ mode }) => {
))}
</ul>
</PerfectScrollbar>
-
)}
{isAddLoading ? (
<p style={{ textAlign: 'center' }}>
@@ -59,28 +56,37 @@ const ProjectList = ({ mode }) => {
) : (
<></>
)}
- <ul className={styles.buttonGroup}>
- <p style={{ textAlign: 'center' }}>
- {/* {pageInfo?.hasNextPage ? (
- <button className={styles.MoreBtn} onClick={() => moreProject()}>More</button>
- ) : (
- <></>
- )} */}
- {
- (() => {
- if (pageInfo?.hasNextPage && projects.length < 16)
- return (<button className={styles.MoreBtn} onClick={() => moreProject()}>More</button>);
- else if (projects.length == 16)
- return (<button className={styles.MoreBtn} onClick={() => window.location.href = "https://github.com/shinhanbyeol?tab=projects&type=new" }>Projects</button>);
- else
- return (<></>);
- })()
- }
- </p>
- <p style={{ textAlign: 'center' }}>
- <button className={styles.MoreBtn} >Guideline</button>
+ <ul className={styles.buttonGroup}>
+ <p style={{ textAlign: 'center' }}>
+ {(() => {
+ if (pageInfo?.hasNextPage && projects.length < 16)
+ return (
+ <button
+ className={styles.MoreBtn}
+ onClick={() => moreProject()}
+ >
+ More
+ </button>
+ );
+ else if (projects.length == 16)
+ return (
+ <button
+ className={styles.MoreBtn}
+ onClick={() =>
+ (window.location.href =
+ 'https://github.com/shinhanbyeol?tab=projects&type=new')
+ }
+ >
+ Projects
+ </button>
+ );
+ else return <></>;
+ })()}
+ </p>
+ <p style={{ textAlign: 'center' }}>
+ <button className={styles.MoreBtn}>Guideline</button>
</p>
- </ul>
+ </ul>
</>
);
};
diff --git a/static/admin/config.yml b/static/admin/config.yml
index 9883c7b..3373a2c 100644
--- a/static/admin/config.yml
+++ b/static/admin/config.yml
@@ -1,7 +1,7 @@
backend:
name: github
- repo: shinhanbyeol/age-community
- branch: static
+ repo: apache/age-website
+ branch: new-web
commit_messages:
create: "Create {{collection}} “{{slug}}”"
update: "Update {{collection}} “{{slug}}”"