From 238b70fe0c040aa9eb9a8162bef57e7716ddda04 Mon Sep 17 00:00:00 2001 From: luca Date: Wed, 5 Jun 2024 17:10:28 +0800 Subject: [PATCH 01/69] feat: initial code --- templates/chain-template/.eslintrc.json | 3 + templates/chain-template/.gitignore | 36 + templates/chain-template/CHANGELOG.md | 406 + templates/chain-template/README.md | 88 + .../components/common/Footer.tsx | 158 + .../components/common/Header.tsx | 80 + .../components/common/Layout.tsx | 19 + .../components/common/index.tsx | 1 + templates/chain-template/components/index.ts | 2 + .../components/wallet/Astronaut.tsx | 156 + .../components/wallet/Chain.tsx | 155 + .../components/wallet/Connect.tsx | 68 + .../chain-template/components/wallet/User.tsx | 27 + .../components/wallet/Wallet.tsx | 117 + .../components/wallet/Warning.tsx | 39 + .../chain-template/components/wallet/index.ts | 1 + templates/chain-template/config/defaults.ts | 2 + templates/chain-template/config/index.ts | 2 + templates/chain-template/config/projects.ts | 51 + templates/chain-template/next.config.js | 6 + templates/chain-template/package.json | 44 + templates/chain-template/pages/_app.tsx | 58 + templates/chain-template/pages/index.tsx | 17 + templates/chain-template/public/favicon.ico | Bin 0 -> 14037 bytes templates/chain-template/styles/globals.css | 27 + templates/chain-template/tsconfig.json | 24 + templates/chain-template/utils/index.ts | 11 + templates/chain-template/yarn.lock | 10290 ++++++++++++++++ 28 files changed, 11888 insertions(+) create mode 100644 templates/chain-template/.eslintrc.json create mode 100644 templates/chain-template/.gitignore create mode 100644 templates/chain-template/CHANGELOG.md create mode 100644 templates/chain-template/README.md create mode 100644 templates/chain-template/components/common/Footer.tsx create mode 100644 templates/chain-template/components/common/Header.tsx create mode 100644 templates/chain-template/components/common/Layout.tsx create mode 100644 templates/chain-template/components/common/index.tsx create mode 100644 templates/chain-template/components/index.ts create mode 100644 templates/chain-template/components/wallet/Astronaut.tsx create mode 100644 templates/chain-template/components/wallet/Chain.tsx create mode 100644 templates/chain-template/components/wallet/Connect.tsx create mode 100644 templates/chain-template/components/wallet/User.tsx create mode 100644 templates/chain-template/components/wallet/Wallet.tsx create mode 100644 templates/chain-template/components/wallet/Warning.tsx create mode 100644 templates/chain-template/components/wallet/index.ts create mode 100644 templates/chain-template/config/defaults.ts create mode 100644 templates/chain-template/config/index.ts create mode 100644 templates/chain-template/config/projects.ts create mode 100644 templates/chain-template/next.config.js create mode 100644 templates/chain-template/package.json create mode 100644 templates/chain-template/pages/_app.tsx create mode 100644 templates/chain-template/pages/index.tsx create mode 100644 templates/chain-template/public/favicon.ico create mode 100644 templates/chain-template/styles/globals.css create mode 100644 templates/chain-template/tsconfig.json create mode 100644 templates/chain-template/utils/index.ts create mode 100644 templates/chain-template/yarn.lock diff --git a/templates/chain-template/.eslintrc.json b/templates/chain-template/.eslintrc.json new file mode 100644 index 000000000..bffb357a7 --- /dev/null +++ b/templates/chain-template/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/templates/chain-template/.gitignore b/templates/chain-template/.gitignore new file mode 100644 index 000000000..c87c9b392 --- /dev/null +++ b/templates/chain-template/.gitignore @@ -0,0 +1,36 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/templates/chain-template/CHANGELOG.md b/templates/chain-template/CHANGELOG.md new file mode 100644 index 000000000..3ee87f067 --- /dev/null +++ b/templates/chain-template/CHANGELOG.md @@ -0,0 +1,406 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [1.0.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.16.2...@cosmology/connect-multi-chain@1.0.0) (2024-04-06) + + +### Bug Fixes + +* custom filtering connect-multi-chain ([0c345ce](https://github.com/cosmology-tech/create-cosmos-app/commit/0c345ceef886ebcd28574244aee3fef8f3d9ebb7)) +* custom filtering stake-tokens ([9cc3d24](https://github.com/cosmology-tech/create-cosmos-app/commit/9cc3d24055cc54358af9dc7d8a56856bd2ef0787)) +* use new combobox in asset-list ([68449d3](https://github.com/cosmology-tech/create-cosmos-app/commit/68449d39411c259f85eec07b7ae42f1a712c21a9)) +* use new dropdown for connect-multi-chain and vote-proposal ([68dd4c3](https://github.com/cosmology-tech/create-cosmos-app/commit/68dd4c3b03939b14ff46c622e6267b41ac7ddf18)) + + + + + +## [0.16.2](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.16.1...@cosmology/connect-multi-chain@0.16.2) (2024-01-20) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.16.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.16.0...@cosmology/connect-multi-chain@0.16.1) (2024-01-19) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +# [0.16.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.15.7...@cosmology/connect-multi-chain@0.16.0) (2024-01-19) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.15.7](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.15.6...@cosmology/connect-multi-chain@0.15.7) (2024-01-19) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.15.6](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.15.5...@cosmology/connect-multi-chain@0.15.6) (2024-01-19) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.15.5](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.15.4...@cosmology/connect-multi-chain@0.15.5) (2023-09-27) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.15.4](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.15.3...@cosmology/connect-multi-chain@0.15.4) (2023-09-27) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.15.3](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.15.2...@cosmology/connect-multi-chain@0.15.3) (2023-07-30) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.15.2](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.15.1...@cosmology/connect-multi-chain@0.15.2) (2023-07-14) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.15.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.15.0...@cosmology/connect-multi-chain@0.15.1) (2023-06-28) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +# [0.15.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.14.3...@cosmology/connect-multi-chain@0.15.0) (2023-04-12) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.14.3](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.14.2...@cosmology/connect-multi-chain@0.14.3) (2023-03-28) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.14.2](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.14.1...@cosmology/connect-multi-chain@0.14.2) (2023-02-15) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.14.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.14.0...@cosmology/connect-multi-chain@0.14.1) (2023-01-11) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +# [0.14.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.13.3...@cosmology/connect-multi-chain@0.14.0) (2022-12-17) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.13.3](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.13.2...@cosmology/connect-multi-chain@0.13.3) (2022-11-25) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.13.2](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.13.1...@cosmology/connect-multi-chain@0.13.2) (2022-11-21) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.13.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.13.0...@cosmology/connect-multi-chain@0.13.1) (2022-11-17) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +# [0.13.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.12.0...@cosmology/connect-multi-chain@0.13.0) (2022-11-15) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +# [0.12.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.11.0...@cosmology/connect-multi-chain@0.12.0) (2022-11-14) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +# [0.11.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.10.0...@cosmology/connect-multi-chain@0.11.0) (2022-11-10) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +# [0.10.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.9.0...@cosmology/connect-multi-chain@0.10.0) (2022-11-09) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +# [0.9.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.8.5...@cosmology/connect-multi-chain@0.9.0) (2022-11-08) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.8.5](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.8.4...@cosmology/connect-multi-chain@0.8.5) (2022-11-05) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.8.4](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.8.3...@cosmology/connect-multi-chain@0.8.4) (2022-11-05) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.8.3](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/connect-multi-chain@0.8.2...@cosmology/connect-multi-chain@0.8.3) (2022-11-05) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## 0.8.2 (2022-11-01) + +**Note:** Version bump only for package @cosmology/connect-multi-chain + + + + + +## [0.8.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.8.0...@cosmonauts/connect-multi-chain@0.8.1) (2022-10-27) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +# [0.8.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.7.3...@cosmonauts/connect-multi-chain@0.8.0) (2022-10-26) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## [0.7.3](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.7.2...@cosmonauts/connect-multi-chain@0.7.3) (2022-10-24) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## [0.7.2](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.7.1...@cosmonauts/connect-multi-chain@0.7.2) (2022-10-15) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## [0.7.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.7.0...@cosmonauts/connect-multi-chain@0.7.1) (2022-10-03) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +# [0.7.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.6.1...@cosmonauts/connect-multi-chain@0.7.0) (2022-09-30) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## [0.6.1](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.6.0...@cosmonauts/connect-multi-chain@0.6.1) (2022-09-25) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +# [0.6.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.5.0...@cosmonauts/connect-multi-chain@0.6.0) (2022-09-25) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +# [0.5.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.4.0...@cosmonauts/connect-multi-chain@0.5.0) (2022-09-23) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +# [0.4.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.3.0...@cosmonauts/connect-multi-chain@0.4.0) (2022-09-22) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +# [0.3.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.2.0...@cosmonauts/connect-multi-chain@0.3.0) (2022-09-22) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +# [0.2.0](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.1.10...@cosmonauts/connect-multi-chain@0.2.0) (2022-09-22) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## [0.1.10](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.1.9...@cosmonauts/connect-multi-chain@0.1.10) (2022-09-11) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## [0.1.9](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.1.8...@cosmonauts/connect-multi-chain@0.1.9) (2022-09-08) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## [0.1.8](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.1.7...@cosmonauts/connect-multi-chain@0.1.8) (2022-09-02) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## [0.1.7](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.1.6...@cosmonauts/connect-multi-chain@0.1.7) (2022-08-30) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## [0.1.6](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.1.5...@cosmonauts/connect-multi-chain@0.1.6) (2022-08-27) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## [0.1.5](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.1.4...@cosmonauts/connect-multi-chain@0.1.5) (2022-08-27) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## [0.1.4](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.1.3...@cosmonauts/connect-multi-chain@0.1.4) (2022-08-27) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## [0.1.3](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmonauts/connect-multi-chain@0.1.2...@cosmonauts/connect-multi-chain@0.1.3) (2022-08-25) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## 0.1.2 (2022-08-25) + +**Note:** Version bump only for package @cosmonauts/connect-multi-chain + + + + + +## 0.1.1 (2022-08-24) + +**Note:** Version bump only for package @cosmos-app/connect-multi-chain diff --git a/templates/chain-template/README.md b/templates/chain-template/README.md new file mode 100644 index 000000000..8c1363707 --- /dev/null +++ b/templates/chain-template/README.md @@ -0,0 +1,88 @@ +This is a Cosmos App project bootstrapped with [`create-cosmos-app`](https://github.com/cosmology-tech/create-cosmos-app). + +## Getting Started + +First, install the packages and run the development server: + +```bash +yarn && yarn dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. + +## Learn More + +### Chain Registry + +The npm package for the Official Cosmos chain registry. Get chain and token data for you application. + +* https://github.com/cosmology-tech/chain-registry + +### Cosmology Videos + +Checkout more videos for how to use various frontend tooling in the Cosmos! + +* https://cosmology.zone/learn + +### Cosmos Kit + +A wallet connector for the Cosmos ⚛️ + +* https://github.com/cosmology-tech/cosmos-kit + +### Telescope + +A "babel for the Cosmos", Telescope is a TypeScript Transpiler for Cosmos Protobufs. Telescope is used to generate libraries for Cosmos blockchains. Simply point to your protobuffer files and create developer-friendly Typescript libraries for teams to build on your blockchain. + +* https://github.com/cosmology-tech/telescope + +🎥 [Checkout the Telescope video playlist](https://www.youtube.com/watch?v=n82MsLe82mk&list=PL-lMkVv7GZwyQaK6bp6kMdOS5mzosxytC) to learn how to use `telescope`! + +### CosmWasm TS Codegen + +The quickest and easiest way to interact with CosmWasm Contracts. @cosmwasm/ts-codegen converts your CosmWasm smart contracts into dev-friendly TypeScript classes so you can focus on shipping code. + +* https://github.com/CosmWasm/ts-codegen + +🎥 [Checkout the CosmWasm/ts-codegen video playlist](https://www.youtube.com/watch?v=D_A5V2PfNLA&list=PL-lMkVv7GZwz1KO3jANwr5W4MoziruXwK) to learn how to use `ts-codegen`! + + +## Learn More about Next.js + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. + +## Related + +Checkout these related projects: + +* [@cosmology/telescope](https://github.com/cosmology-tech/telescope) Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules. +* [@cosmwasm/ts-codegen](https://github.com/CosmWasm/ts-codegen) Convert your CosmWasm smart contracts into dev-friendly TypeScript classes. +* [chain-registry](https://github.com/cosmology-tech/chain-registry) Everything from token symbols, logos, and IBC denominations for all assets you want to support in your application. +* [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit) Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface. +* [create-cosmos-app](https://github.com/cosmology-tech/create-cosmos-app) Set up a modern Cosmos app by running one command. +* [interchain-ui](https://github.com/cosmology-tech/interchain-ui) The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit. +* [starship](https://github.com/cosmology-tech/starship) Unified Testing and Development for the Interchain. + +## Credits + +🛠 Built by Cosmology — if you like our tools, please consider delegating to [our validator ⚛️](https://cosmology.zone/validator) + + +## Disclaimer + +AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. + +No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. diff --git a/templates/chain-template/components/common/Footer.tsx b/templates/chain-template/components/common/Footer.tsx new file mode 100644 index 000000000..ca89213b3 --- /dev/null +++ b/templates/chain-template/components/common/Footer.tsx @@ -0,0 +1,158 @@ +import { + Box, + Divider, + Icon, + Link, + Stack, + Text, + useColorModeValue, +} from "@interchain-ui/react"; +import { dependencies, products, Project } from "@/config"; + +function Product({ name, desc, link }: Project) { + return ( + + + + {name} → + + + {desc} + + + + ); +} + +function Dependency({ name, desc, link }: Project) { + return ( + + + + + + + + + {name} + + + {desc} + + + + + ); +} + +export function Footer() { + return ( + <> + + {products.map((product) => )} + + + {dependencies.map((dependency) => ( + + ))} + + + + + + Built with + + Cosmology + + + + ); +} diff --git a/templates/chain-template/components/common/Header.tsx b/templates/chain-template/components/common/Header.tsx new file mode 100644 index 000000000..86ffefe45 --- /dev/null +++ b/templates/chain-template/components/common/Header.tsx @@ -0,0 +1,80 @@ +import { + Box, + Button, + Icon, + Link, + Text, + useColorModeValue, + useTheme, +} from "@interchain-ui/react"; +import { dependencies } from "@/config"; + +const stacks = ["CosmosKit", "Next.js"]; + +const stargazejs = dependencies[0]; + +export function Header() { + const { theme, setTheme } = useTheme(); + + const toggleColorMode = () => { + setTheme(theme === "light" ? "dark" : "light"); + }; + + return ( + <> + + + + + + + Create Cosmos App + + + + Welcome to  + + + {stacks.join(" + ")} + {" + "} + + + {stargazejs.name} + + + + + + ); +} diff --git a/templates/chain-template/components/common/Layout.tsx b/templates/chain-template/components/common/Layout.tsx new file mode 100644 index 000000000..e69553853 --- /dev/null +++ b/templates/chain-template/components/common/Layout.tsx @@ -0,0 +1,19 @@ +import Head from 'next/head'; +import { Container } from '@interchain-ui/react'; +import { Header } from './Header'; +import { Footer } from './Footer'; + +export function Layout({ children }: { children: React.ReactNode }) { + return ( + + + Create Cosmos App + + + +
+ {children} +