Skip to content

Commit

Permalink
Redirect to /vuln (#2738)
Browse files Browse the repository at this point in the history
  • Loading branch information
nulls authored Oct 17, 2023
1 parent c9c10a9 commit 3db81fa
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,19 @@ 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.*
import kotlinx.browser.window

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

0 comments on commit 3db81fa

Please sign in to comment.