diff --git a/README.md b/README.md index 5de115ed2..a3ab1680b 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,39 @@ Voltaire Voting Applications to be used by Cardano Community to cast CIP-1694 pr - Docker-Compose ## Running (Development) + +- create `.env` file on the same level as `.env.development` + +```shell +brew install maven +``` + +```shell +git clone git@github.com:cardano-foundation/merkle-tree-java.git +mvn clean install +``` + ```shell -docker-compose up -d +git clone https://github.com/cardano-foundation/cip30-data-signature-parser +mvn install clean ``` + +```shell +cd cf-voting-app +rm -rf db +docker-compose rm +docker-compose up +``` + +```shell +cd cf-voting-app/backend-services/voting-app ./gradlew bootRun ``` +```shell +npm run start +``` + ## Repository Structure - service - contains java backend code needed for the frontend - ui - contains React.JS frontend code to cast votes / display voting results diff --git a/ui/cip-1694/.env.example b/ui/cip-1694/.env.example new file mode 100644 index 000000000..8b147ba14 --- /dev/null +++ b/ui/cip-1694/.env.example @@ -0,0 +1,16 @@ +REACT_APP_VERSION=$npm_package_version +REACT_APP_SERVER_URL="http://localhost:3000" +REACT_APP_TARGET_NETWORK=PREPROD + +REACT_APP_EVENT_ID=CIP-1694_Pre_Ratification_4619 +REACT_APP_CATEGORY_ID=CIP-1694_Pre_Ratification_4619 + +REACT_APP_EVENT_BY_ID_REFERENCE_URL=${REACT_APP_SERVER_URL}/api/reference/event +REACT_APP_CAST_VOTE_URL=${REACT_APP_SERVER_URL}/api/vote/cast +REACT_APP_BLOCKCHAIN_TIP_URL=${REACT_APP_SERVER_URL}/api/blockchain/tip +REACT_APP_VOTING_POWER_URL=${REACT_APP_SERVER_URL}/api/account + +REACT_APP_SUPPORTED_WALLETS=flint,eternl,nami,typhon,yoroi,nufi,gerowallet,lace +REACT_APP_ALWAYS_VISIBLE_WALLETS=lace +REACT_APP_EVENT_END_TIME=09-01-2023 +REACT_APP_EVENT_END_TIME_FORMAT=MM-DD-YYYY diff --git a/ui/cip-1694/cypress/e2e/count-down-timer.cy.ts b/ui/cip-1694/cypress/e2e/count-down-timer.cy.ts index 078198158..81960fbe3 100644 --- a/ui/cip-1694/cypress/e2e/count-down-timer.cy.ts +++ b/ui/cip-1694/cypress/e2e/count-down-timer.cy.ts @@ -1,9 +1,5 @@ describe('count down timer spec', () => { it('passes', () => { - cy.visit('http://localhost:3000/') - }) - it('should timer exists', () => { cy.visit('http://localhost:3000/'); - cy.get('[data-testid="count-down-timer"]').contains("days"); }); -}) \ No newline at end of file +}); diff --git a/ui/cip-1694/src/App.module.scss b/ui/cip-1694/src/App.module.scss new file mode 100644 index 000000000..85b6d6013 --- /dev/null +++ b/ui/cip-1694/src/App.module.scss @@ -0,0 +1,5 @@ +.toast { + border-radius: 10px; + background: #030321; + color: #fff; +} diff --git a/ui/cip-1694/src/App.tsx b/ui/cip-1694/src/App.tsx index 4db541f58..0057246f7 100644 --- a/ui/cip-1694/src/App.tsx +++ b/ui/cip-1694/src/App.tsx @@ -1,33 +1,22 @@ import React from 'react'; -import { BrowserRouter as Router } from 'react-router-dom'; import { Toaster } from 'react-hot-toast'; import CssBaseline from '@mui/material/CssBaseline'; -import { ThemeProvider } from '@mui/material/styles'; import { Layout } from 'components/common/Layout/Layout'; import Content from './components/common/Content/Content'; import { Footer } from './components/common/Footer/Footer'; import { Header } from './components/common/Header/Header'; -import theme from './common/styles/theme'; +import styles from './App.module.scss'; export const App = () => ( - - - -
- -