From 86581a421a2903251e467bdcf74a72097e1f35b6 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Fri, 10 Jun 2022 11:22:36 -0500 Subject: [PATCH] Home: Add floating plus button that takes you to /create --- web/pages/home.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/web/pages/home.tsx b/web/pages/home.tsx index e8c991d4..39671019 100644 --- a/web/pages/home.tsx +++ b/web/pages/home.tsx @@ -1,5 +1,6 @@ import React, { useEffect, useState } from 'react' -import Router from 'next/router' +import Router, { useRouter } from 'next/router' +import { PlusSmIcon } from '@heroicons/react/solid' import { Page } from 'web/components/page' import { Col } from 'web/components/layout/col' @@ -13,6 +14,8 @@ const Home = () => { const user = useUser() const [contract, setContract] = useContractPage() + const router = useRouter() + if (user === null) { Router.replace('/') return <> @@ -36,6 +39,13 @@ const Home = () => { }} /> + {contract && (