summaryrefslogtreecommitdiff
path: root/src/routes/companies
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/companies')
-rw-r--r--src/routes/companies/companies.tsx23
-rw-r--r--src/routes/companies/company_products.tsx0
2 files changed, 23 insertions, 0 deletions
diff --git a/src/routes/companies/companies.tsx b/src/routes/companies/companies.tsx
new file mode 100644
index 0000000..7912b80
--- /dev/null
+++ b/src/routes/companies/companies.tsx
@@ -0,0 +1,23 @@
+import { useLoaderData } from "react-router-dom";
+import CompanyDetails from "../../components/company_details";
+import MainContentLayout from "../../components/main_content_layout";
+import SearchBar from "../../components/search_bar";
+
+export default function Companies(){
+ const companies = useLoaderData().data.data.map(company =>
+ <li key={company.id}>
+ <CompanyDetails company={company}/>
+ </li>
+ );
+
+ return(
+ <>
+ <MainContentLayout>
+ <SearchBar path="/companies"/>
+ <ul>
+ {companies}
+ </ul>
+ </MainContentLayout>
+ </>
+ );
+} \ No newline at end of file
diff --git a/src/routes/companies/company_products.tsx b/src/routes/companies/company_products.tsx
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/routes/companies/company_products.tsx