-
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.
Add about page with project info (#44)
References ========== - https://koenvangilst.nl/snippets/git-hash - https://nodejs.dev/learn/the-package-json-guide
- Loading branch information
1 parent
554005b
commit ef8f92d
Showing
7 changed files
with
217 additions
and
136 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { Descriptions, Row, Badge, Space } from 'antd'; | ||
|
||
const AboutApp = () => ( | ||
<Row justify="center"> | ||
<Descriptions bordered> | ||
<Descriptions.Item label="Name" span={3}> | ||
{process.env.APP_NAME} | ||
</Descriptions.Item> | ||
<Descriptions.Item label="Description" span={3}> | ||
{process.env.APP_DESCRIPTION} | ||
</Descriptions.Item> | ||
<Descriptions.Item label="Version" span={3}> | ||
v{process.env.APP_VERSION} | ||
</Descriptions.Item> | ||
<Descriptions.Item label="Homepage" span={2}> | ||
<a href={process.env.HOMEPAGE}>{process.env.HOMEPAGE}</a> | ||
</Descriptions.Item> | ||
<Descriptions.Item label="Status" span={1}> | ||
<Badge status="processing" text="Running" /> | ||
</Descriptions.Item> | ||
<Descriptions.Item label="Repository URL" span={3}> | ||
<a href={process.env.REPOSITORY_URL}>{process.env.REPOSITORY_URL}</a> | ||
</Descriptions.Item> | ||
<Descriptions.Item label="Bug Tracker" span={3}> | ||
<a href={process.env.BUG_TRACKER}>{process.env.BUG_TRACKER}</a> | ||
</Descriptions.Item> | ||
<Descriptions.Item label="Hash" span={3}> | ||
<a href={`${process.env.REPOSITORY_URL}/tree/${process.env.COMMIT_HASH}`}> | ||
{process.env.COMMIT_HASH.substring(0, 8)} | ||
</a> | ||
</Descriptions.Item> | ||
<Descriptions.Item label="License" span={3}> | ||
{process.env.APP_LICENSE} | ||
</Descriptions.Item> | ||
</Descriptions> | ||
</Row> | ||
); | ||
|
||
export default AboutApp; |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const pkg = require('./package.json'); | ||
|
||
// starts a command line process to get the git hash | ||
const commitHash = require('child_process').execSync('git rev-parse HEAD').toString().trim(); | ||
|
||
module.exports = { | ||
env: { | ||
APP_NAME: pkg.name, | ||
APP_DESCRIPTION: pkg.description, | ||
APP_VERSION: pkg.version, | ||
APP_LICENSE: pkg.license, | ||
HOMEPAGE: pkg.homepage, | ||
BUG_TRACKER: pkg.bugs, | ||
REPOSITORY_URL: pkg.repository.url, | ||
COMMIT_HASH: commitHash | ||
} | ||
}; |
Oops, something went wrong.
ef8f92d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
cesium-link – ./
cesium.link
cesium-link-cesiuminho.vercel.app
cesium-link.vercel.app
cesium-link-git-main-cesiuminho.vercel.app