NEAR-DevHub / neardevhub-treasury-dashboard

MIT License
1 stars 0 forks source link

Setup moderators and trustees dashboard #11

Closed Megha-Dev-19 closed 3 weeks ago

Megha-Dev-19 commented 4 months ago
petersalomonsen commented 4 months ago

the line with the build script in package.json does not seem to copy .jsx files when combining typescript and jsx in transforms.

a quick fix is to have two sucrase commands like this:

  "build": "npm run fmt && rimraf .bos/transpiled && mkdir -p .bos/transpiled/src && sucrase ./src -d .bos/transpiled/src/neardevhub-trustees --transforms jsx --jsx-runtime preserve --disable-es-transforms --out-extension jsx && sucrase ./src -d .bos/transpiled/src/neardevhub-trustees --transforms typescript --jsx-runtime preserve --disable-es-transforms --out-extension jsx && node ./build.js",
petersalomonsen commented 4 months ago

@Megha-Dev-19 see my latest commit that makes sure that both transpiled tsx and jsx files are copied. It also fixes so that every line starting with export in common.tsx is adjusted to not contain the export statement.

petersalomonsen commented 4 months ago

@Megha-Dev-19 Check out the watcher in the latest commit. You can now run npm run build:watch to automatically build when there are changes in the src folder.

Megha-Dev-19 commented 4 months ago

@petersalomonsen thank you so much, everything works as expected

petersalomonsen commented 4 months ago

added two new tests for logged in as moderator and not logged in scenarios

notloggedin.webm moderator.webm

Megha-Dev-19 commented 3 weeks ago

Closing, since we will integrate bos-workspace