1.0.57 • Published 3 years ago

@beatchainmusic/ui v1.0.57

Weekly downloads
224
License
-
Repository
-
Last release
3 years ago

The single page application for the main Beatchain web app. Built with custom webpack config and deployed to S3/Cloudfront static hosting.

Useful commands

Run development server in watch mode

npm start

Run development server against localhost API

npm run local

Run full minified build locally

npm run build-development && npx serve build

🚨 Run localhost against production API (use with caution! but sometimes useful for debugging and with real users and data)

npm run debug-prod

HTTPS in development

Useful for testing stripe payment request button or API integrations that require https.

Instructions for MAC: 1. Install mkcert: brew install mkcert 2. Create certificates: mkcert -key-file ./key.pem -cert-file ./cert.pem "localhost" 3. Grab local IP: ifconfig en0 | grep inet | grep -v inet6 | awk '{print $2}' 4. Run docker replacing ip_address with the output from 3. : docker run --name nginx_proxy -d -v `pwd`:/etc/nginx/conf.d --add-host localnode:192.168.0.66 -p 443:443 nginx 5. Access your locahost:3000 development server through https://localhost

Data fetching

Please use the withData higher order component as this simplifies and standardises common CRUD requirements. This replaces custom ajax logic, redux-saga and apollo/graphql entirely.

Basic example

This simple example wraps your component and handles data fetching (using React.useEffect internally), presenting standard props of props.data and props.isLoading. props.getData is also passed down to allow re-fetching data. apiPath is a function that should return the required api route. actId plus any props from the component are available as parameters.

export default withData({ component: Playlists, apiPath: ({ actId }) => `insights/${actId}/playlists` });

Multiple api calls on mount

Occasionally you need to fetch data from two different APIs when you mount the component. In this case just pass an array for apiPath.

export default withData({ component: Playlists, apiPath: [ ({ actId }) => `insights/${actId}/playlists` ({ actId }) => `distribution/${actId}/releases` ] });

Component Styling

styled components standards to go here

@apollo/client@aws-amplify/auth@aws-amplify/core@babel/core@babel/polyfill@fortawesome/fontawesome-svg-core@fortawesome/free-brands-svg-icons@fortawesome/free-regular-svg-icons@fortawesome/free-solid-svg-icons@fortawesome/react-fontawesome@hot-loader/react-dom@nivo/bar@nivo/line@nivo/pie@stripe/react-stripe-js@stripe/stripe-js@types/d3-geo@types/lodash@types/node@types/numeral@types/react@types/react-dom@types/styled-componentsamazon-cognito-identity-jsarray-moveaws-amplifybuttercmschange-casecheerioclassnamesconnected-react-routerd3-arrayd3-scaledate-fnsdeep-object-diffdetect-browserdraft-jsdraftjs-utilsemoji-martfbjsformikfs-extraget-user-localegraphqlhistoryhtml-react-parserignore-stylesisomorphic-unfetchjs-cookielinkify-itlodashmusic-metadata-browsernumeralomit-deep-lodashphotoeditorsdkpluralizepolishedprettierprop-typesquery-stringrc-sliderreactreact-ad-block-detectreact-autosuggestreact-avatarreact-barcodereact-beautiful-dndreact-circular-progressbarreact-colorreact-cookie-consentreact-cool-onclickoutsidereact-countupreact-custom-scrollbarsreact-datepickerreact-device-detectreact-div-100vhreact-domreact-draggablereact-dropzonereact-frame-componentreact-helmetreact-html-parserreact-iconsreact-lazy-loadreact-map-glreact-masonry-cssreact-playerreact-preloadreact-rangereact-reduxreact-routerreact-router-domreact-selectreact-sharereact-sortable-hocreact-sparklinesreact-springreact-svg-worldmapreact-swipeablereact-switchreact-textarea-autosizereact-toastifyreact-tooltipreact-transition-groupreact-truncate-markupreact-universal-componentreact-use-dimensionsreact-windowreact-window-infinite-loaderreact-with-gesturereduxredux-catchredux-devtools-extensionredux-sagasanitize-html-reactstyled-componentsstyled-resetuniversal-cookieurl-search-params-polyfilluse-debounceuse-deep-compare-effectuuidvalidateyoutube-player
1.0.57

3 years ago

1.0.56

3 years ago

1.0.55

3 years ago

1.0.54

3 years ago

1.0.53

3 years ago

1.0.52

3 years ago

1.0.48

3 years ago

1.0.47

3 years ago

1.0.49

3 years ago

1.0.51

3 years ago

1.0.50

3 years ago

1.0.46

3 years ago

1.0.44

3 years ago

1.0.45

3 years ago

1.0.43

3 years ago

1.0.42

3 years ago

1.0.41

3 years ago

1.0.39

3 years ago

1.0.40

3 years ago

1.0.38

3 years ago

1.0.37

3 years ago

1.0.36

3 years ago

1.0.35

3 years ago

1.0.34

3 years ago

1.0.33

3 years ago

1.0.19

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.32

3 years ago

1.0.31

3 years ago

1.0.30

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.11

3 years ago

1.0.12

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

0.1.0

3 years ago