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/09/05 05:45:40 UTC
[age-website] branch new-web updated: Update ProjectDetail.js
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 cbc3953 Update ProjectDetail.js
cbc3953 is described below
commit cbc395324685dd3b6990b6f438b33400bf16ca01
Author: Hanbyeol Shin / David Shin / 신한별 <76...@users.noreply.github.com>
AuthorDate: Mon Sep 5 14:45:27 2022 +0900
Update ProjectDetail.js
1. To be Available project notice add
---
src/common/antd.css | 2 +-
src/components/AgeProjectList.js | 2 --
src/components/ProjectDetail.js | 25 ++++++++++++++++++++-----
3 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/src/common/antd.css b/src/common/antd.css
index f300769..db47086 100644
--- a/src/common/antd.css
+++ b/src/common/antd.css
@@ -22878,7 +22878,7 @@ textarea.ant-mentions {
}
.ant-notification-notice-message {
margin-bottom: 8px;
- color: rgba(0, 0, 0, 0.85);
+ color: #B8145A;
font-size: 16px;
line-height: 24px;
}
diff --git a/src/components/AgeProjectList.js b/src/components/AgeProjectList.js
index 6af1fe8..19118db 100644
--- a/src/components/AgeProjectList.js
+++ b/src/components/AgeProjectList.js
@@ -61,8 +61,6 @@ const ProjectList = ({ mode }) => {
<ul className={styles.buttonGroup}>
<p style={{ textAlign: 'center' }}>
{(() => {
-//console.log('AgeProjectList pageInfo')
-//console.log(pageInfo.totalCount)
if (pageInfo?.hasNextPage && projects.length < 12)
return (
<button
diff --git a/src/components/ProjectDetail.js b/src/components/ProjectDetail.js
index 59bf209..ecce097 100644
--- a/src/components/ProjectDetail.js
+++ b/src/components/ProjectDetail.js
@@ -1,4 +1,5 @@
import React, { useEffect, useState, useCallback } from 'react';
+import { notification } from 'antd';
import PropTypes from 'prop-types';
import * as styles from './styles/ProjectDtail.module.scss';
@@ -6,12 +7,19 @@ const ProjectDetail = (props) => {
const [project] = useState({ ...props?.project });
const [mode] = useState({ ...props?.mod });
- useEffect(() => {}, []);
+ useEffect(() => { }, []);
const card = useCallback(() => {
return <div></div>;
}, [project]);
+ const openNotification = () => {
+ notification.open({
+ message: 'To be available soon',
+ placement: 'top'
+ });
+ };
+
const projectDateMaker = (dateString) => {
const stringArr = dateString.split('T');
const d = new Date(stringArr[0]);
@@ -29,12 +37,19 @@ const ProjectDetail = (props) => {
</p>
<p className={styles.title}>{project.title}</p>
<p className={styles.desc}>
- {(project.shortDescription) == undefined ? "No description" : project.shortDescription }
+ {(project.shortDescription) == undefined ? "No description" : project.shortDescription}
</p>
</div>
- <a className={styles.link} href={project.url} target="_blank">
- View Details
- </a>
+ {project.public ?
+ <a className={styles.link} href={project.url} target="_blank">
+ View Details
+ </a> :
+ <a className={styles.link} onClick={(e) => {
+ e.preventDefault();
+ openNotification();
+ }}>
+ To be Available...
+ </a>}
</div>
);
}, [project]);