Skip to content

Commit

Permalink
add redirect url as ENV (#933)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekVigas authored Nov 16, 2024
1 parent 79fd919 commit 93c9f2f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ NEXT_PUBLIC_isPostponeLive=true
NEXT_PUBLIC_navodyBaseUrl=https://staging.navody.digital
NEXT_PUBLIC_priznanieStepUrl=/zivotne-situacie/elektronicke-podanie-danoveho-priznania-2022/krok/prihlasit-sa-na-financnu-spravu
NEXT_PUBLIC_odkladStepUrl=/zivotne-situacie/odklad-danoveho-priznania-2023/krok/podat-odklad
NEXT_PUBLIC_informujteMaKedBudeLive=/zivotne-situacie/elektronicke-podanie-danoveho-priznania-2024
RANDOM_TEST_LENGTH=20
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
navodyBaseUrl: process.env.NEXT_PUBLIC_navodyBaseUrl,
priznanieStepUrl: process.env.NEXT_PUBLIC_priznanieStepUrl,
odkladStepUrl: process.env.NEXT_PUBLIC_odkladStepUrl,
informujteMaKedBudeLive: process.env.NEXT_PUBLIC_informujteMaKedBudeLive,
plausibleDomain: process.env.NEXT_PUBLIC_plausibleDomain,
odkladEmailTemplateId: process.env.NEXT_PUBLIC_odkladEmailTemplateId,
priznanieEmailTemplateId: process.env.NEXT_PUBLIC_priznanieEmailTemplateId,
Expand Down
7 changes: 6 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import styles from './index.module.css'
import { Warning } from '../components/Warning'
import { TAX_YEAR } from '../lib/calculation'
import { ExternalLink } from '../components/ExternalLink'
import getConfig from 'next/config'

const IconCheck = () => (
<svg
Expand Down Expand Up @@ -72,6 +73,10 @@ const Home = ({

export default Home

const {
publicRuntimeConfig: { informujteMaKedBudeLive, navodyBaseUrl },
} = getConfig()

const TaxFormSection = ({ nextRoute, isDebug, isLive }) => {
return (
<>
Expand Down Expand Up @@ -169,7 +174,7 @@ const TaxFormSection = ({ nextRoute, isDebug, isLive }) => {

{!isLive && (
<Link
href="https://navody.digital/zivotne-situacie/elektronicke-podanie-danoveho-priznania-2023#aplikacia"
href={`${navodyBaseUrl}${informujteMaKedBudeLive}`}
legacyBehavior
>
<button
Expand Down

0 comments on commit 93c9f2f

Please sign in to comment.