Skip to content
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

Merged
merged 1 commit into from
Jun 5, 2023
Merged

Bugs v1.1 (#75) #76

merged 1 commit into from
Jun 5, 2023

Conversation

hadarhubara10
Copy link
Contributor

No description provided.

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 96c0c6e
Status:🚫  Build failed.

View logs

Comment on lines +6 to +23
<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
)
Copy link
Member

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?

Copy link
Contributor Author

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).

Comment on lines +28 to +37
(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))
Copy link
Member

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?

Copy link
Contributor Author

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')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is '0.5' ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recommended amount and default value of the fund
image

@@ -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')
Copy link
Member

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?

Copy link
Contributor Author

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

@forshtat forshtat merged commit 7e0827c into main Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants