tester-dt
v0.0.26-beta
Published
## Run Locally
Downloads
4
Readme
DAO Terminal
Run Locally
Clone the project
git clone https://link-to-project
Install dependencies
npm install
Create a .env file in the root directory
touch .env
Environment Variables
To run this project, you will need to add the following environment variables to your .env file.
BASE_API_URL
-> Contact team for current url.
ALCHEMY_ID
-> ETH Mainnet Alchemy ID (free)
WALLCONNECT_PROJECT_ID
-> WalletConnect Cloud Project ID (free)
Run the component locally
npm run storybook
Local Deployment
npm run build-lib
npm pack
From there you can copy the path of the tgz
file created and in a React app run
npm i `full-path-to-tarball.tgz`
Usage/Examples
If you are using Next.js you must import the package dynamically
import dynamic from "next/dynamic";
const DaoTerminal = dynamic(() => import("package-name").then(({ DaoTerminal }) => DaoTerminal), {
ssr: false,
});
function App() {
return (
<div style={{ height: "80vh" }}>
<DaoTerminal icon={"/qwan-logo.svg"} theme={"dark"} spaceId="ty-sir.eth" />
</div>
);
}
If using CRA or there is not SSR initially you can import it named
import { DaoTerminal } from "package-name";
function App() {
return (
<div style={{ height: "80vh" }}>
<DaoTerminal icon={"/qwan-logo.svg"} theme={"dark"} spaceId="ty-sir.eth" />
</div>
);
}
DaoTerminal Required Props
| Name | Description | Type | | ------- | --------------------------------------------------- | ----------------- | | theme | Defines whether package is in dark or light mode. | "light" or "dark" | | icon | Logo seen in nav-bars. Use a path to a local image. | string | | spaceId | ENS name of snapshot space. | string |
Deployment
To deploy this project change the name
and version
values in package.json
npm run build-lib
git add .
git commit -m "deployment"
git push origin [branch-name]
npm login
npm publish
The package will then be live on npm and can be installed as shown in Usage/Examples