mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-15 04:58:43 +00:00
fix(challenge/preact): use JSX fragments
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
import { render, h } from 'preact';
|
import { render, h, Fragment } from 'preact';
|
||||||
import { useState, useEffect } from 'preact/hooks';
|
import { useState, useEffect } from 'preact/hooks';
|
||||||
import { g, j, u } from "./xeact.js";
|
import { g, j, u } from "./xeact.js";
|
||||||
import { Sha256 } from '@aws-crypto/sha256-js';
|
import { Sha256 } from '@aws-crypto/sha256-js';
|
||||||
|
|
||||||
/** @jsx h */
|
/** @jsx h */
|
||||||
|
/** @jsxFrag Fragment */
|
||||||
|
|
||||||
function toHexString(arr) {
|
function toHexString(arr) {
|
||||||
return Array.from(arr)
|
return Array.from(arr)
|
||||||
@@ -45,17 +46,17 @@ const App = () => {
|
|||||||
}, [passed]);
|
}, [passed]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
{imageURL !== null && (
|
{imageURL !== null && (
|
||||||
<img src={imageURL} style="width:100%;max-width:256px;" />
|
<img src={imageURL} style="width:100%;max-width:256px;" />
|
||||||
)}
|
)}
|
||||||
{state !== null && (
|
{state !== null && (
|
||||||
<div>
|
<>
|
||||||
<p id="status">{state.loading_message}</p>
|
<p id="status">{state.loading_message}</p>
|
||||||
<p>{state.connection_security_message}</p>
|
<p>{state.connection_security_message}</p>
|
||||||
</div>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user