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

Redirect to /vuln #2738

Merged
merged 14 commits into from
Oct 17, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,18 @@ import react.Props

import react.dom.html.ReactHTML.div
import react.dom.html.ReactHTML.main
import react.router.useNavigate
import react.useEffect
import web.cssom.*

@Suppress("EMPTY_BLOCK_STRUCTURE_ERROR")
val indexView: FC<IndexViewProps> = FC { props ->
val navigate = useNavigate()
useEffect {
if (kotlinx.browser.window.location.run { hostname in setOf("cosv.dev", "cosv.gitlink.org.cn") && pathname == "/"}) {
Fixed Show fixed Hide fixed
Fixed Show fixed Hide fixed
navigate("/vuln")
}
}
useBackground(Style.INDEX)
particles()
main {
Expand Down