Initial state
This commit is contained in:
29
packages/hello-world/hello.tsx
Normal file
29
packages/hello-world/hello.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import React from "react";
|
||||
import op from "object-path";
|
||||
import config from "~/config";
|
||||
// const config = {
|
||||
// title: "Hello World",
|
||||
// description: "Hello World description",
|
||||
// };
|
||||
|
||||
const data = {
|
||||
title: "Hello World",
|
||||
description: "Hello World description",
|
||||
og: {
|
||||
title: config.title,
|
||||
description: config.description,
|
||||
image: "https://duogeeks.com/images/logo.png",
|
||||
},
|
||||
};
|
||||
|
||||
const HelloWorld: React.FC = () => {
|
||||
return (
|
||||
<div>
|
||||
<strong>Hello World !</strong>
|
||||
<p>{data.description}</p>
|
||||
<p>Name: {op.get(data, "og.title")}</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default HelloWorld;
|
||||
25
packages/hello-world/package.json
Normal file
25
packages/hello-world/package.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "@duogeeks/hello-world",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"exports": {
|
||||
".": "./hello.tsx"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@types/object-path": "^0.11.4",
|
||||
"@types/react": "^18.2.20",
|
||||
"react": "^18.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^18.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"object-path": "^0.11.8"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user