Skip to content

Commit

Permalink
00000007-78bbcf4e
Browse files Browse the repository at this point in the history
  • Loading branch information
user committed Jan 1, 2020
1 parent 263fdde commit ec8893a
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 2,626 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "^3.4.1",
"serverless": "^1.71.3",
"typescript": "^3.9.3"
}
}
4 changes: 2 additions & 2 deletions scripts/merkle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -euo pipefail;

git log --graph --decorate -n 2;
git --no-pager log --graph --decorate -n 2;
echo;

read -p "$(tput bold)$(tput setaf 1)Press Y to normalize the merkle tree. Press N to quit. $(tput smul)" -n 1 -r;
Expand Down Expand Up @@ -29,4 +29,4 @@ eval "$env";
git commit --amend --no-edit;

echo;
git log --graph --decorate -n 2;
git --no-pager log --graph --decorate -n 2;
1 change: 0 additions & 1 deletion src/components/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export const Form: React.FC<{
const submitter: HTMLInputElement | undefined =
nativeEvent.submitter ||
nativeEvent.target.querySelector("fieldset :enabled");
console.log({ submitter });
const submitterName = submitter?.name || "value";
if (submitter && !data.has(submitterName)) {
let value =
Expand Down
1 change: 0 additions & 1 deletion src/components/printed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export const Printed: React.FC<{ values: Array<ReactNode | any> }> = ({
) {
return <span key={i}>{value}</span>;
} else {
console.log(value);
if (value instanceof FormData) {
value = Object.fromEntries(
[...value.keys()].map((key) => [key, value.getAll(key)])
Expand Down
10 changes: 5 additions & 5 deletions src/core/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export class App {
))
);

await sleep(0.5);

print(
await inputs(
<>
Expand All @@ -49,11 +51,9 @@ export class App {
required
minLength={1}
/>
<button value="A" autoFocus>
A
</button>
<button value="B">B</button>
<button value="C">C</button>
<button autoFocus>A</button>
<button>B</button>
<button>C</button>
</>
)
);
Expand Down
5 changes: 1 addition & 4 deletions src/utilities/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ export const inputs = async (
})
);

export const elementInput = async (child: ReactElement): Promise<string> =>
(await inputs(child)).value || "";

export const input = async (child?: string | ReactElement): Promise<string> => {
if (typeof child === "string") {
child = <input autoFocus placeholder={child} />;
} else if (typeof child === "undefined") {
child = <input autoFocus />;
}
return (await inputs(child)).value;
return (await inputs(child)).value || "";
};
Loading

0 comments on commit ec8893a

Please sign in to comment.