add addrainfall on home
This commit is contained in:
@@ -1,16 +1,22 @@
|
||||
import React from "react"
|
||||
import React, {useState} from "react"
|
||||
import useAuthUser from "../hooks/AuthUser"
|
||||
import YearRainfall from "../components/rainfall/YearRainfaill"
|
||||
import PageLayout from "../components/PageLayout"
|
||||
import AddRainfall from "../components/rainfall/AddRainfall"
|
||||
|
||||
const Home = () => {
|
||||
|
||||
const {authUser} = useAuthUser()
|
||||
const [loadedAt, reload] = useState(new Date)
|
||||
|
||||
return <div>
|
||||
{authUser
|
||||
? <PageLayout>
|
||||
<YearRainfall />
|
||||
<div className="flex flex-col gap-2">
|
||||
<YearRainfall loadedAt={loadedAt} />
|
||||
|
||||
<AddRainfall reload={reload}/>
|
||||
</div>
|
||||
</PageLayout>
|
||||
: <div className="px-5 pt-10">
|
||||
<h1 className="text-lg font-bold">Application pour enregistrer sa pluviométrie</h1>
|
||||
|
||||
Reference in New Issue
Block a user