mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +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",
|
||||
srcs = glob([
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
]),
|
||||
data = [
|
||||
":LICENSE",
|
||||
@ -44,7 +43,6 @@ eslint_test(
|
||||
name = "lint",
|
||||
srcs = glob([
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
]),
|
||||
)
|
||||
|
||||
@ -65,7 +63,7 @@ pkg_npm(
|
||||
# This doesn't work currently because imports of local packages aren't resolved correctly.
|
||||
# jest_test(
|
||||
# name = "test",
|
||||
# srcs = glob(["**/*.ts", "**/*.tsx"]),
|
||||
# srcs = glob(["**/*.ts"]),
|
||||
# jest_config = ":jest.config.js",
|
||||
# deps = [
|
||||
# "//language-support/ts/daml-types",
|
||||
|
@ -2,7 +2,6 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React, { useReducer, useMemo } from 'react';
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
import { DamlLedgerContext } from './context';
|
||||
import Credentials from './credentials';
|
||||
import * as LedgerStore from './ledgerStore';
|
||||
@ -21,11 +20,7 @@ const DamlLedger: React.FC<Props> = (props) => {
|
||||
party: props.credentials.party,
|
||||
ledger: new Ledger(props.credentials.token),
|
||||
}), [props.credentials, store, dispatch])
|
||||
return (
|
||||
<DamlLedgerContext.Provider value={state}>
|
||||
{props.children}
|
||||
</DamlLedgerContext.Provider>
|
||||
);
|
||||
return React.createElement(DamlLedgerContext.Provider, {value: state}, props.children);
|
||||
}
|
||||
|
||||
export default DamlLedger;
|
Loading…
Reference in New Issue
Block a user