Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Build error #614

Merged
merged 3 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,6 @@ We use [Playwright](https://playwright.dev) for tests, which are located in the

See the [test-pipeline](./.github/workflows/continuous-integration-workflow.yml) for what dependencies that needs to be installed on your workstation for tests to run.


#### Making Changes to common.jsx

The `common.jsx` file contains a set of shared utilities that are often reused in DevHub widgets. When you need to change it, just edit the file in the root of the project, and update the widgets with this one command:

```
npm run build
```

#### Storage Deposit

Sometimes there is a need to deposit extra tokens to cover the widgets’ storage cost. You can do that with [`bos` CLI](https://github.com/FroVolod/bos-cli-rs):
Expand Down
46 changes: 0 additions & 46 deletions module/include.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"scripts": {
"fmt": "prettier --write '**/*.{js,jsx,ts,tsx,json}'",
"fmt:check": "prettier --check '**/*.{js,jsx,ts,tsx,json}'",
"build": "npm run fmt && node ./module/include.js",
"build": "npm run fmt",
"dev:testnet": "./scripts/dev.sh",
"dev:mainnet": "./scripts/dev.sh -a devhub.near -c devgovgigs.near -n mainnet",
"build:preview": "node ./scripts/build-preview.mjs",
Expand Down
17 changes: 1 addition & 16 deletions src/devhub/entity/post/History.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,7 @@ props.timestamp: number;
props.referral: any;
*/

function href(widgetName, linkProps) {
Megha-Dev-19 marked this conversation as resolved.
Show resolved Hide resolved
linkProps = { ...linkProps };
if (props.referral) {
linkProps.referral = props.referral;
}

const linkPropsQuery = Object.entries(linkProps)
.filter(([_key, nullable]) => (nullable ?? null) !== null)
.map(([key, value]) => `${key}=${value}`)
.join("&");

return `/${REPL_DEVHUB}/widget/devhub.page.${widgetName}${
linkPropsQuery ? "?" : ""
}${linkPropsQuery}`;
}
/* END_INCLUDE: "common.jsx" */
const { href } = VM.require("${REPL_DEVHUB}/widget/core.lib.url") || (() => {});

const postId = props.post.id ?? (props.id ? parseInt(props.id) : 0);
const post =
Expand Down