mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
daml-react.ts: Don't use JSX (#4273)
We have only one place where we could use it. The linter is struggling with it, so let's just avoid it. CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
d9dffc13c4
commit
d6f54612c3
@ -13,7 +13,6 @@ ts_library(
|
|||||||
name = "daml-react",
|
name = "daml-react",
|
||||||
srcs = glob([
|
srcs = glob([
|
||||||
"**/*.ts",
|
"**/*.ts",
|
||||||
"**/*.tsx",
|
|
||||||
]),
|
]),
|
||||||
data = [
|
data = [
|
||||||
":LICENSE",
|
":LICENSE",
|
||||||
@ -44,7 +43,6 @@ eslint_test(
|
|||||||
name = "lint",
|
name = "lint",
|
||||||
srcs = glob([
|
srcs = glob([
|
||||||
"**/*.ts",
|
"**/*.ts",
|
||||||
"**/*.tsx",
|
|
||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -65,7 +63,7 @@ pkg_npm(
|
|||||||
# This doesn't work currently because imports of local packages aren't resolved correctly.
|
# This doesn't work currently because imports of local packages aren't resolved correctly.
|
||||||
# jest_test(
|
# jest_test(
|
||||||
# name = "test",
|
# name = "test",
|
||||||
# srcs = glob(["**/*.ts", "**/*.tsx"]),
|
# srcs = glob(["**/*.ts"]),
|
||||||
# jest_config = ":jest.config.js",
|
# jest_config = ":jest.config.js",
|
||||||
# deps = [
|
# deps = [
|
||||||
# "//language-support/ts/daml-types",
|
# "//language-support/ts/daml-types",
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import React, { useReducer, useMemo } from 'react';
|
import React, { useReducer, useMemo } from 'react';
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
import { DamlLedgerContext } from './context';
|
import { DamlLedgerContext } from './context';
|
||||||
import Credentials from './credentials';
|
import Credentials from './credentials';
|
||||||
import * as LedgerStore from './ledgerStore';
|
import * as LedgerStore from './ledgerStore';
|
||||||
@ -21,11 +20,7 @@ const DamlLedger: React.FC<Props> = (props) => {
|
|||||||
party: props.credentials.party,
|
party: props.credentials.party,
|
||||||
ledger: new Ledger(props.credentials.token),
|
ledger: new Ledger(props.credentials.token),
|
||||||
}), [props.credentials, store, dispatch])
|
}), [props.credentials, store, dispatch])
|
||||||
return (
|
return React.createElement(DamlLedgerContext.Provider, {value: state}, props.children);
|
||||||
<DamlLedgerContext.Provider value={state}>
|
|
||||||
{props.children}
|
|
||||||
</DamlLedgerContext.Provider>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default DamlLedger;
|
export default DamlLedger;
|
Loading…
Reference in New Issue
Block a user