We expect the `Markdown` component to receive a `content: string`, but
we also check if `content` is truthy before rendering anything, and this
can get messy when `content` is an empty string.
Fixed by removing the truthy check for `content`.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
Move constants that are tightly coupled to the implementation of
features and unlikely to change or be user configurable out of `config.json`.
Decouple configuration from wallet state.
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
We only use it in one place anyway. And components should be
self-contained, so they're easier to reason about.
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
Rinkeby has been sunsetted in favour of Goerli after the Ethereum merge.
Deployed `phase0` from radicle-contracts, some vesting contracts and the
faucet from `radicle-faucet` to the Goerli testnet and adjusted the
code.
The `reverseRegistrar` was obtained from:
https://app.ens.domains/name/addr.reverse/details
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
Note: We get the following warning in the dev console after upgrading
vite from 3.0.3 -> 3.1.7:
Module "buffer" has been externalized for browser compatibility.
Cannot access "buffer.Buffer" in client code.
It comes from the transitive dependency `bn.js`, only versions 4.11.x are
affected. The warning is harmless and can be ignored. It should go away
once the direct dependencies upgrade to a newer version.
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
`Error` is a built-in type in typescript, we don't want to have an
accidental clash.
Bumped into this when doing:
try {
// ...
} catch (error: unknown) {
if(error instanceof Error) {
// ...
}
}
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
- add a link to the faucet page from `Rinkeby` badge in header
- refactor the `<TextInput>` component to include
- a loading indicator
- a keyboard shortcut to submit the input by pressing the `enter` key
- add a keyboard shortcut hint <kbd>⏎</kbd> that shows up whenever the
input is ready to be submitted
- a validation message
- align all pages with a single input form to have a similar look and feel
- improve validation messages and error handling in all forms
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
- type events that are handed between components
- simplify the `resolve` function interface
- before we had return values and exceptions, now just a single union
type as return value
- move navigation to the Search component to reduce its
responsibilities
- flatten and simplify multi-level branching
- shuffle around code
- move the `resolve` function to the `Search` component module,
because it's only used there
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>