Skip to content

Commit

Permalink
new features
Browse files Browse the repository at this point in the history
  • Loading branch information
ogeobubu committed Oct 22, 2024
1 parent 1fbc8f0 commit 11c09bc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
27 changes: 15 additions & 12 deletions client/src/pages/homepage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,33 @@ const Homepage = () => {
backgroundSize: "cover",
backgroundPosition: "center",
}}
className="h-[100vh]"
className="h-[100vh] flex flex-col"
>
<div className="overlay absolute top-0 left-0 w-full h-full bg-black opacity-50"></div>
<div className="above-overlay absolute top-0 left-0 w-full h-full z-10">
<div className="flex flex-col justify-center items-center p-4 md:max-w-4xl m-auto h-[100%]">
<h1 className="text-4xl text-white my-8">
Leaf Identification System
</h1>
<div className="above-overlay absolute top-0 left-0 w-full h-full z-10 flex flex-col justify-between">
<div className="md:max-w-4xl p-4 md:p-0 flex flex-col flex-grow mx-auto justify-center items-center">
<h1 className="text-4xl text-white my-8">
Leaf Identification System
</h1>
<div className="flex flex-col justify-center items-center flex-grow">
<p className="text-white text-2xl">
<strong className="text-4xl">Welcome</strong> to our leaf
identification system. This tool is designed to help you easily
identify plants based on their leaves. Simply upload an image of a
leaf, and our advanced algorithms will analyze its unique features
to provide accurate results
</p>
<div className="flex md:flex-row flex-col gap-3 justify-between items-center w-full mt-8">
<Button className="w-[100%]" href="/upload">Identify Leaf</Button>
<Button>Learn More</Button>
<Button>About Us</Button>
</div>
</div>
<div className="flex md:flex-row flex-col gap-3 justify-between items-center w-full mb-8">
<Button className="w-[100%]" href="/upload">Identify Leaf</Button>
<Button>Learn More</Button>
<Button>About Us</Button>
</div>
</div>

</div>
</div>
);
};

export default Homepage;
export default Homepage;
2 changes: 1 addition & 1 deletion client/src/pages/upload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ImageUpload: React.FC = () => {
const [modalVisible, setModalVisible] = useState(false);
const [classificationResult, setClassificationResult] = useState<LeafResponse | null>(null);

const mutation: UseMutationResult<LeafResponse, Error, File> = useMutation({
const { mutate, isLoading } = useMutation({
mutationFn: uploadImage,
onSuccess: (data) => {
console.log("Upload success:", data);
Expand Down
6 changes: 1 addition & 5 deletions client/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",

/* Linting */
"strict": true,
"strict": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
Expand Down

0 comments on commit 11c09bc

Please sign in to comment.