mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 15:07:13 +01:00
move all wizard specific stuff to components/wizard
This commit is contained in:
13
components/header.js
Normal file
13
components/header.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
export default function Header() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<h1 className="text-3xl">Pfadi Bussle Buchen</h1>
|
||||||
|
|
||||||
|
<p className="mb-8">
|
||||||
|
Du willst das Pfadi Bussle buchen? Hier bist du richtig!
|
||||||
|
</p>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useContext } from 'react'
|
import React, { useContext } from 'react'
|
||||||
import { WizardContext } from '../context/wizardStore'
|
import { WizardContext } from './context/wizardStore'
|
||||||
import Required from './required'
|
import Required from './required'
|
||||||
|
|
||||||
export default function Contact() {
|
export default function Contact() {
|
||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
storeBookingData,
|
storeBookingData,
|
||||||
loadBookingData,
|
loadBookingData,
|
||||||
clearBookingData,
|
clearBookingData,
|
||||||
} from '../helpers/storage'
|
} from '../../../helpers/storage'
|
||||||
|
|
||||||
export const WizardContext = React.createContext()
|
export const WizardContext = React.createContext()
|
||||||
|
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
import React, { useContext, useState, useRef, useEffect } from 'react'
|
import React, { useContext, useState, useRef, useEffect } from 'react'
|
||||||
import useSWR from 'swr'
|
import useSWR from 'swr'
|
||||||
|
|
||||||
import { WizardContext } from '../context/wizardStore'
|
import { WizardContext } from './context/wizardStore'
|
||||||
|
|
||||||
import { DateUtils } from 'react-day-picker'
|
import { DateUtils } from 'react-day-picker'
|
||||||
import DayPickerInput from 'react-day-picker/DayPickerInput'
|
import DayPickerInput from 'react-day-picker/DayPickerInput'
|
||||||
|
|
||||||
import Required from './required'
|
import Required from './required'
|
||||||
import { dateFormatBackend } from '../helpers/date'
|
import { dateFormatBackend } from '../../helpers/date'
|
||||||
import { getNextSmaller, getNextBigger } from '../helpers/array'
|
import { getNextSmaller, getNextBigger } from '../../helpers/array'
|
||||||
|
|
||||||
import MomentLocaleUtils, {
|
import MomentLocaleUtils, {
|
||||||
formatDate,
|
formatDate,
|
||||||
@@ -2,7 +2,7 @@ import React, { useContext } from 'react'
|
|||||||
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
|
||||||
import WizardStore, { WizardContext } from '../context/wizardStore'
|
import WizardStore, { WizardContext } from './context/wizardStore'
|
||||||
|
|
||||||
import DateSelect from './dateSelect'
|
import DateSelect from './dateSelect'
|
||||||
import Reason from './reason'
|
import Reason from './reason'
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useContext } from 'react'
|
import React, { useContext } from 'react'
|
||||||
import { WizardContext } from '../context/wizardStore'
|
import { WizardContext } from './context/wizardStore'
|
||||||
import Required from './required'
|
import Required from './required'
|
||||||
|
|
||||||
export default function Contact() {
|
export default function Contact() {
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import React, { useContext } from 'react'
|
import React, { useContext } from 'react'
|
||||||
|
|
||||||
import { WizardContext } from '../../context/wizardStore'
|
|
||||||
import Footer from '../../components/footer'
|
import Footer from '../../components/footer'
|
||||||
|
|
||||||
// TODO: load booking somehow if we navigate to booking
|
// TODO: load booking somehow if we navigate to booking
|
||||||
|
|||||||
@@ -2,8 +2,9 @@ import React from 'react'
|
|||||||
|
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
|
|
||||||
import Wizard from '../components/wizard'
|
import Header from '../components/header'
|
||||||
import Footer from '../components/footer'
|
import Footer from '../components/footer'
|
||||||
|
import Wizard from '../components/wizard/index'
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
@@ -13,16 +14,10 @@ export default function Home() {
|
|||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
|
<Header />
|
||||||
<main className="flex-grow">
|
<main className="flex-grow">
|
||||||
<h1 className="text-3xl">Pfadi Bussle Buchen</h1>
|
|
||||||
|
|
||||||
<p className="mb-8">
|
|
||||||
Du willst das Pfadi Bussle buchen? Hier bist du richtig!
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<Wizard />
|
<Wizard />
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user