-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ran whole app through prettier formatting
- Loading branch information
unknown
committed
Dec 1, 2022
1 parent
93aa932
commit 6cac381
Showing
26 changed files
with
40,610 additions
and
742 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
asset-manifest.json,1664196078910,5d5a2c401f165f37a228cb21ae767e165d7e423b296d6b89c6fc1977e5d82c80 | ||
manifest.json,1662452293554,5c997de1364b8be939319fa9209abd77f2caf7f8844999a9e2e9173f844e7840 | ||
robots.txt,1662452293555,b2090cf9761ef60aa06e4fab97679bd43dfa5e5df073701ead5879d7c68f1ec5 | ||
index.html,1664196078910,0b51670631bae625a85868b1a6b5661627271cb65eb9d614a7915ea71fd4ebd4 | ||
%PUBLIC_URL%/favicon.ico,1662452293553,e84822bd47b0388511fb16ee0ed7d17738a27d2242369e84f2cc3bacaed0f482 | ||
static/js/main.00d924de.js.LICENSE.txt,1664196078922,c17e6f25a8c829f26fce26231da4e876cf1bc493667c4adab1b96ce6b1ae3ee3 | ||
static/css/main.6ff3c759.css,1664196078923,8bc3436f8a612114d8584125e6f3d99991dad42232fea9e01adb05e199ac47a0 | ||
static/css/main.6ff3c759.css.map,1664196078923,ff93c79127ccdd015cbdbc5e2a09eb51a536f21d47dba323dfca06d4908fca02 | ||
static/js/main.00d924de.js.map,1664196078923,7bfe48ca8818a0c8bd147a15149782ccbd62e741bef6b08c244b059a9cdd17a8 | ||
static/js/main.00d924de.js,1664196078924,1ed05f0a47270dbdaec4d9a3229aac2bbcb03b73e65b48eb520b1f510cfa5c44 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projects": { | ||
"default": "igomap" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,3 @@ | |
tasks: | ||
- init: npm install && npm run build | ||
command: npm run start | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"liveServer.settings.port": 5501 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# Map of intergovernmental organisations | ||
|
||
## About | ||
|
||
Intergovernmental organisations map or IGO map for short, | ||
is an interactive application where you can select any of around 250 different international | ||
organisations which were data-scraped from [World Fact Book](https://www.cia.gov/the-world-factbook/) using python into a [JSON file](https://github.com/forgeManNation/map/blob/a94a262f0891681e9198abf3c95a37240c06052f/src/data/IGOs.json), which now functions as a user-side database. | ||
Additional data about all of the countries were downloaded from a public source and can be found in another [JSON file](https://github.com/forgeManNation/map/blob/a94a262f0891681e9198abf3c95a37240c06052f/src/data/world_countries_information.json). | ||
In next versions of this app the information and most importantly the flag of each country will be stored server-side to prevent long loading times. Additional data about each organisation are fetched from wikipedia and loaded asynchronously. | ||
|
||
In next versions of this app the information and most importantly the flag of each country will be stored server-side to prevent long loading times. Additional data about each organisation are fetched from wikipedia and loaded asynchronously. | ||
|
||
## Technology used | ||
|
||
Aplication uses React, Leaflet Tailwind and Typescript. | ||
|
||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"hosting": { | ||
"public": "build", | ||
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"], | ||
"rewrites": [ | ||
{ | ||
"source": "**", | ||
"destination": "/index.html" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ module.exports = { | |
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" style="overflow: hidden;" > | ||
<html lang="en" style="overflow: hidden"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> | ||
|
@@ -11,27 +11,29 @@ | |
/> | ||
<script src="../path/to/flowbite/dist/flowbite.js"></script> | ||
<link | ||
href="https://fonts.googleapis.com/icon?family=Material+Icons" | ||
rel="stylesheet" | ||
href="https://fonts.googleapis.com/icon?family=Material+Icons" | ||
rel="stylesheet" | ||
/> | ||
|
||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" | ||
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" | ||
crossorigin=""/> | ||
<link | ||
rel="stylesheet" | ||
href="https://unpkg.com/[email protected]/dist/leaflet.css" | ||
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" | ||
crossorigin="" | ||
/> | ||
|
||
<!-- Make sure you put this AFTER Leaflet's CSS --> | ||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" | ||
<!-- Make sure you put this AFTER Leaflet's CSS --> | ||
<script | ||
src="https://unpkg.com/[email protected]/dist/leaflet.js" | ||
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==" | ||
crossorigin=""></script> | ||
|
||
|
||
|
||
crossorigin="" | ||
></script> | ||
|
||
<link | ||
rel="stylesheet" | ||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" | ||
integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==" | ||
crossOrigin="anonymous" | ||
rel="stylesheet" | ||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" | ||
integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==" | ||
crossorigin="anonymous" | ||
/> | ||
|
||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> | ||
|
@@ -53,7 +55,7 @@ | |
</head> | ||
<body style="height: 100%"> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root" style="height: 100%" ></div> | ||
<div id="root" style="height: 100%"></div> | ||
<!-- | ||
This HTML file is a template. | ||
If you open it directly in the browser, you will see an empty page. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
.App { | ||
text-align: center; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,68 @@ | ||
import React, {useState} from 'react'; | ||
import './App.css'; | ||
import SearchBar from './components/searchbar/SearchBar'; | ||
import React, { useState } from "react"; | ||
import "./App.css"; | ||
import SearchBar from "./components/searchbar/SearchBar"; | ||
import Map from "./components/map/Map"; | ||
import "@material-tailwind/react/tailwind.css"; | ||
import IntroductionModal from './components/modals/IntroductionModal'; | ||
import IntroductionModal from "./components/modals/IntroductionModal"; | ||
import OrganizationInfo from "./components/organizationinfo/OrganizationInfo"; | ||
import EditModal from './components/modals/EditModal'; | ||
import { InformationCircleIcon} from '@heroicons/react/outline' | ||
|
||
import EditModal from "./components/modals/EditModal"; | ||
import { InformationCircleIcon } from "@heroicons/react/outline"; | ||
|
||
function App() { | ||
|
||
//name of intergovernmental organisation the user selected to show | ||
const [curentOrg, setcurentOrg] = useState(""); | ||
|
||
function changeCurrentOrg(org: string) { | ||
setcurentOrg(org); | ||
setcurentOrg(org); | ||
} | ||
|
||
//introduction modal with text about the applicaiton | ||
const [introductionModalOpen, setintroductionModalOpen] = useState(false) | ||
|
||
const [introductionModalOpen, setintroductionModalOpen] = useState(false); | ||
|
||
function triggerIntroductionModal() { | ||
setintroductionModalOpen(!introductionModalOpen) | ||
setintroductionModalOpen(!introductionModalOpen); | ||
} | ||
|
||
|
||
return ( | ||
<div className="App" style={{overflow: "auto", height: "100%"}} > | ||
<div className="App" style={{ overflow: "auto", height: "100%" }}> | ||
<div className=" flex flex-row "> | ||
<SearchBar triggerIntroductionModal = {triggerIntroductionModal} changeCurrentOrg={changeCurrentOrg}></SearchBar> | ||
<div className=' w-full'> | ||
<Map currentOrganization={curentOrg} ></Map> | ||
{curentOrg ? <OrganizationInfo currentOrganization = {curentOrg} ></OrganizationInfo> : <></> } | ||
<SearchBar | ||
triggerIntroductionModal={triggerIntroductionModal} | ||
changeCurrentOrg={changeCurrentOrg} | ||
></SearchBar> | ||
<div className=" w-full"> | ||
<Map currentOrganization={curentOrg}></Map> | ||
{curentOrg ? ( | ||
<OrganizationInfo | ||
currentOrganization={curentOrg} | ||
></OrganizationInfo> | ||
) : ( | ||
<></> | ||
)} | ||
</div> | ||
<div className= {' flex flex-row h-fit w-fit fixed right-0 m-7 bottom-5 ' } style = {{alignSelf: "flex-start"}}> | ||
<div onClick={triggerIntroductionModal} className=' m-2 w-fit p-4 h-fit bg-slate-100 bg-opacity-80 hover:bg-slate-600 hover:cursor-pointer rounded-full'><InformationCircleIcon className=' scale-125 h-5 w-5'/></div> | ||
<IntroductionModal triggerIntroductionModal = {triggerIntroductionModal} open = {introductionModalOpen}></IntroductionModal> | ||
{curentOrg ? <EditModal currentOrganization={curentOrg}></EditModal> : <></>} | ||
<div | ||
className={" flex flex-row h-fit w-fit fixed right-0 m-7 bottom-5 "} | ||
style={{ alignSelf: "flex-start" }} | ||
> | ||
<div | ||
onClick={triggerIntroductionModal} | ||
className=" m-2 w-fit p-4 h-fit bg-slate-100 bg-opacity-80 hover:bg-slate-600 hover:cursor-pointer rounded-full" | ||
> | ||
<InformationCircleIcon className=" scale-125 h-5 w-5" /> | ||
</div> | ||
<IntroductionModal | ||
triggerIntroductionModal={triggerIntroductionModal} | ||
open={introductionModalOpen} | ||
></IntroductionModal> | ||
{curentOrg ? ( | ||
<EditModal currentOrganization={curentOrg}></EditModal> | ||
) : ( | ||
<></> | ||
)} | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
); | ||
} | ||
|
||
export default App; | ||
export default App; |
Oops, something went wrong.