add monthly rainfalls
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from "react"
|
||||
import useAuthUser from "../hooks/AuthUser"
|
||||
import Rainfall from "./Rainfall"
|
||||
import YearRainfall from "../components/rainfall/YearRainfaill"
|
||||
import PageLayout from "../components/PageLayout"
|
||||
|
||||
const Home = () => {
|
||||
|
||||
@@ -8,7 +9,9 @@ const Home = () => {
|
||||
|
||||
return <div>
|
||||
{authUser
|
||||
? <Rainfall />
|
||||
? <PageLayout>
|
||||
<YearRainfall />
|
||||
</PageLayout>
|
||||
: <div className="px-5 pt-10">
|
||||
<h1 className="text-lg font-bold">Application pour enregistrer sa pluviométrie</h1>
|
||||
<p className="mt-5">Un compte est nécessaire mais les inscriptions ne sont pas ouvertes.</p>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import React, {useEffect, useState} from "react"
|
||||
import PageLayout from "../components/PageLayout"
|
||||
import LastFiveMesure from "../components/rainfall/LastFiveMesure"
|
||||
import AddRainfall from "../components/rainfall/AddRainfall"
|
||||
import useAxiosTools from "../hooks/AxiosTools"
|
||||
import {rainfallGraphData} from "../types"
|
||||
import Field from "../components/Field"
|
||||
import useDimension from "../hooks/DimensionHook"
|
||||
import RainFallEcharts from "../components/rainfall/RainFallEcharts"
|
||||
import PageLayout from "../../components/PageLayout"
|
||||
import LastFiveMesure from "../../components/rainfall/LastFiveMesure"
|
||||
import AddRainfall from "../../components/rainfall/AddRainfall"
|
||||
import useAxiosTools from "../../hooks/AxiosTools"
|
||||
import {rainfallGraphData} from "../../types"
|
||||
import Field from "../../components/Field"
|
||||
import useDimension from "../../hooks/DimensionHook"
|
||||
import RainFallEcharts from "../../components/rainfall/RainFallEcharts"
|
||||
|
||||
const Rainfall = () => {
|
||||
const RainfallGraph = () => {
|
||||
|
||||
const [loadedAt, reload] = useState(new Date)
|
||||
const [graphData, setGraphData] = useState<rainfallGraphData[]>([])
|
||||
@@ -77,4 +77,4 @@ const Rainfall = () => {
|
||||
</PageLayout>
|
||||
}
|
||||
|
||||
export default Rainfall
|
||||
export default RainfallGraph
|
||||
@@ -9,7 +9,7 @@ const Home = lazy(() => import('./Home'))
|
||||
const Login = lazy(() => import('./Auth/Login'))
|
||||
const Profile = lazy(() => import('./Auth/Profile'))
|
||||
const Reset = lazy(() => import('./Auth/Reset'))
|
||||
const Rainfall = lazy(() => import('./Rainfall'))
|
||||
const Rainfall = lazy(() => import('./Rainfall/RainfallGraph'))
|
||||
const RainfallIndex = lazy(() => import('./Rainfall/RainfallIndex'))
|
||||
|
||||
const Router = () => {
|
||||
|
||||
Reference in New Issue
Block a user