-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugs v1.1 (#75) #76
Bugs v1.1 (#75) #76
Conversation
<script type="text/javascript"> | ||
var pathSegmentsToKeep = 1 | ||
|
||
var l = window.location | ||
l.replace( | ||
l.protocol + | ||
'//' + | ||
l.hostname + | ||
(l.port ? ':' + l.port : '') + | ||
l.pathname | ||
.split('/') | ||
.slice(0, 1 + pathSegmentsToKeep) | ||
.join('/') + | ||
'/?/' + | ||
l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') + | ||
(l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') + | ||
l.hash | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @hadarhubara10
Can you please explain what is going on here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the 404 bug, here is the solution from github - anitab-org/stem-diverse-tv-cms#48 (comment).
(function(l) { | ||
if (l.search[1] === '/' ) { | ||
var decoded = l.search.slice(1).split('&').map(function(s) { | ||
return s.replace(/~and~/g, '&') | ||
}).join('?'); | ||
window.history.replaceState(null, null, | ||
l.pathname.slice(0, -1) + decoded + l.hash | ||
); | ||
} | ||
}(window.location)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question here, actually. Why is this code necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for the 404 bug, here is the solution from github - anitab-org/stem-diverse-tv-cms#48 (comment).
const [open, setOpen] = useState<boolean>(true) | ||
const dispatch = useAppDispatch() | ||
|
||
useEffect(() => { | ||
setToken('') | ||
setHashes({}) | ||
setLocalMintAmount('') | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
setFunds('0.5') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is '0.5' ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -15,7 +15,7 @@ interface IProps { | |||
export default function Funder({ success }: IProps) { | |||
const [hashes, setHashes] = useLocalStorage<Hashes>('hashes', {}) | |||
const [listen, setListen] = useState(false) | |||
const [funds, setFunds] = useState<number>(0.5) | |||
const [funds, setFunds] = useLocalStorage<string>('funds', '0.5') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General question - I see we store a lot of things in the local storage. When do we clean it up? Will there be an issue if the user wants to register two relays in a row?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not be a problem, this is cleaned up in the success modal
No description provided.