mirror of
https://github.com/IT4Change/ohmyform-ui.git
synced 2025-12-13 09:45:50 +00:00
fix heroku redirects
This commit is contained in:
parent
acb26096d6
commit
d40acbbc0b
@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- [OMF#93](https://github.com/ohmyform/ohmyform/issues/93) dropdown options are not saved
|
- [OMF#93](https://github.com/ohmyform/ohmyform/issues/93) dropdown options are not saved
|
||||||
|
- redirect attempts on static export
|
||||||
|
|
||||||
## [0.9.2] - 2020-06-04
|
## [0.9.2] - 2020-06-04
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
# OhMyForm UI
|
# OhMyForm UI
|
||||||
|
|
||||||

|
|
||||||
[](https://travis-ci.org/ohmyform/ui)
|
[](https://travis-ci.org/ohmyform/ui)
|
||||||

|

|
||||||

|

|
||||||
|
|||||||
@ -19,7 +19,7 @@ const Index: NextPage = () => {
|
|||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (router.pathname !== window.location.pathname) {
|
if (router.pathname !== window.location.pathname && window.location.pathname.length > 2) {
|
||||||
let href = router.asPath
|
let href = router.asPath
|
||||||
const as = router.asPath
|
const as = router.asPath
|
||||||
const possible = [/(\/form\/)[^/]+/i, /(\/admin\/forms\/)[^/]+/i, /(\/admin\/users\/)[^/]+/i]
|
const possible = [/(\/form\/)[^/]+/i, /(\/admin\/forms\/)[^/]+/i, /(\/admin\/users\/)[^/]+/i]
|
||||||
@ -38,7 +38,9 @@ const Index: NextPage = () => {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
publicRuntimeConfig.spa ||
|
publicRuntimeConfig.spa ||
|
||||||
(process.browser && router.pathname !== window.location.pathname)
|
(process.browser &&
|
||||||
|
router.pathname !== window.location.pathname &&
|
||||||
|
window.location.pathname.length > 2)
|
||||||
) {
|
) {
|
||||||
return <LoadingPage message={t('loading')} />
|
return <LoadingPage message={t('loading')} />
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user