mirror of
https://github.com/Lissy93/web-check.git
synced 2025-02-24 14:22:03 +01:00
🚧 Start on results components
This commit is contained in:
parent
24ee4bde17
commit
c461e10428
@ -1,6 +1,7 @@
|
||||
import { Route, Routes } from 'react-router-dom';
|
||||
import Styled from 'styled-components';
|
||||
import Home from 'pages/Home';
|
||||
import Results from 'pages/Results';
|
||||
import colors from 'styles/colors';
|
||||
|
||||
const Container = Styled.main`
|
||||
@ -16,6 +17,7 @@ function App() {
|
||||
<Container>
|
||||
<Routes>
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="/results/:address" element={<Results />} />
|
||||
</Routes>
|
||||
</Container>
|
||||
);
|
||||
|
@ -18,3 +18,10 @@ code {
|
||||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
||||
monospace;
|
||||
}
|
||||
#fancy-background { color: var(--background, #141d2b); }
|
||||
|
||||
|
||||
::selection {
|
||||
background: var(--primary, #9fef00);
|
||||
color: var(--background, #141d2b);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ const Home = (): JSX.Element => {
|
||||
setErrMsg('Must be a valid URL, IPv4 or IPv6 Address');
|
||||
} else {
|
||||
const resultRouteParams: NavigateOptions = { state: { address, addressType } };
|
||||
navigate('/results', resultRouteParams);
|
||||
navigate(`/results/${encodeURIComponent(address)}`, resultRouteParams);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user