diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..b6680505 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,15 @@ +# Contribution Guide + +## Open ToDos + +[Kanban Board](https://github.com/orgs/utopia-os/projects/2/) + +## Code + +* use named exports + +## Layout + +* use [heroicons](https://heroicons.com/) or alternatively [React Icons](https://react-icons.github.io/react-icons/) +* use [Daisy UI](https://daisyui.com/) with [tailwindcss](https://tailwindcss.com/) +* make use of the Daisy UI [theme colors](https://daisyui.com/docs/colors/) \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 90828451..3b54e906 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,20 @@ { "name": "utopia-ui", +<<<<<<< HEAD "version": "3.0.0-alpha.204", +======= + "version": "3.0.0-alpha.215", +>>>>>>> 8dc8779fe58040fb5c2a763d6519e57ddffc7ab7 "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", +<<<<<<< HEAD "version": "3.0.0-alpha.204", +======= + "version": "3.0.0-alpha.215", +>>>>>>> 8dc8779fe58040fb5c2a763d6519e57ddffc7ab7 "license": "MIT", "dependencies": { "@heroicons/react": "^2.0.17", @@ -825,11 +833,11 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -2078,9 +2086,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, diff --git a/package.json b/package.json index 6fe22df1..f41e1282 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,10 @@ { "name": "utopia-ui", +<<<<<<< HEAD "version": "3.0.0-alpha.204", +======= + "version": "3.0.0-alpha.215", +>>>>>>> 8dc8779fe58040fb5c2a763d6519e57ddffc7ab7 "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage:": "https://utopia-os.org/", diff --git a/src/Components/AppShell/AppShell.tsx b/src/Components/AppShell/AppShell.tsx index ee6e7c20..034c989b 100644 --- a/src/Components/AppShell/AppShell.tsx +++ b/src/Components/AppShell/AppShell.tsx @@ -15,6 +15,8 @@ import { LayersProvider } from '../Map/hooks/useLayers' import { LeafletRefsProvider } from '../Map/hooks/useLeafletRefs' import { SelectPositionProvider } from '../Map/hooks/useSelectPosition' import { ClusterRefProvider } from '../Map/hooks/useClusterRef' +import 'react-toastify/dist/ReactToastify.css'; + export function AppShell({ appName, children, assetsApi, userType }: { appName: string, children: React.ReactNode, assetsApi: AssetsApi, userType: string }) { diff --git a/src/Components/AppShell/Sitemap.tsx b/src/Components/AppShell/Sitemap.tsx new file mode 100644 index 00000000..df461d21 --- /dev/null +++ b/src/Components/AppShell/Sitemap.tsx @@ -0,0 +1,36 @@ +import { useEffect, useState } from 'react'; +import { useItems } from '../Map/hooks/useItems'; + +export const Sitemap = ({url}:{url:string}) => { + const [sitemap, setSitemap] = useState(''); + + const items = useItems(); + + useEffect(() => { + if (items.length) { + const generateSitemap = () => { + let sitemapXML = `\n`; + sitemapXML += `\n`; + + items.forEach(item => { + sitemapXML += ` \n`; + sitemapXML += ` ${url}/${item.slug}\n`; + sitemapXML += ` \n`; + }); + + sitemapXML += ``; + return sitemapXML; + }; + + setSitemap(generateSitemap()); + } + }, [items]); + + return ( +
+

Sitemap

+