whf-site
is a React application that is deployed to ADD WEBSITE URL.
yarn install
yarn start
Runs the app in the development mode.
Open http://localhost:5173 to view it in your browser.
yarn build
yarn preview
Runs the app in the development mode.
Open http://localhost:4173 to view it in your browser.
Merge the lastest dev
branch into the prod
branch and netlify will take care of the rest.
Currently deploys on netlify
This site uses EmailJS to handle sending emails from the contact page, eliminating the need for a backend server. To set this up locally, create a file named .env
in the root of the project with the contents of .env_sample
that has the three service id/keys required to use email.js. To hook this up on the deployed version, set the env variables through netlify (site configuration -> environment variables).
This site uses the Google Cloud Maps Platform and the react-google-maps library to render an interactive map on the contact page. To set this up locally, create a file named .env
in the root of the project with the contents of .env_sample
that contains the Maps Platform API Key. To hook this up on the deployed version, set the env variables through netlify (site configuration -> environment variables). The map will be hidden if no API key is provided.
NGD Frontend uses ESLint (a linter for code quality rules) and Prettier (a code formatter that styles all the code in the same way). To run:
yarn lint
: Runs ESLint and will display all errors and warnings in the console
yarn lint:fix
: Runs ESLint and fixes any problems that can be automatically fixed
yarn format
: Runs Prettier and will display all errors and warnings in the console
yarn format:fix
: Runs Prettier and automatically formats all the files
There is a pre-commit hook that runs yarn lint
and yarn format
, that will prevent commits that don't match the coding standards of the project. If using VSCode, there are several extentions to automatically format on save such as Prettier ESLint and Prettier - Code formatter