React Treeviews Test
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import React from 'react';
|
||||
import { useState } from 'react'
|
||||
import PropertySideBar from '../components/PropertySideBar';
|
||||
import UseFetch from '../components/tools/UseFetch';
|
||||
|
||||
const PropertyPage = () => {
|
||||
const { data: properties, isLoading, error } = UseFetch(`http://localhost:8088/propertygroup/1`)
|
||||
const [update, setUpdate] = useState(false)
|
||||
|
||||
if (isLoading) return <p>Loading profile...</p>
|
||||
if (error) return <p>Error: {error}</p>
|
||||
|
||||
return (
|
||||
<div className="content">
|
||||
<div><PropertySideBar properties={properties} setUpdate={setUpdate} /></div>
|
||||
<div className="main"></div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PropertyPage;
|
||||
|
||||
Reference in New Issue
Block a user