vite-bugs/packages/hello-world/hello.tsx

30 lines
618 B
TypeScript
Raw Normal View History

2024-03-16 22:48:55 +00:00
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;