Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plastic Origin - Map Refacto V2 #2

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f9cf3a2
Init V2
atila-1 Oct 23, 2024
4f4575d
Fix heatMap + migrate to jsx + refactoring
atila-1 Oct 30, 2024
5a58eff
add: deploy workflow
atila-1 Oct 30, 2024
7f42fcd
Refactorisation du workflow de déploiement et mise à jour des dépenda…
atila-1 Oct 31, 2024
0dac6af
Usecontext + refactoring api
atila-1 Nov 6, 2024
d70e484
Refactorisation des types et ajout de nouveaux composants pour la ges…
atila-1 Nov 7, 2024
509f527
Ajout de la dépendance date-fns, mise à jour des styles SCSS, et refa…
atila-1 Nov 20, 2024
7b17cce
Ajout de la dépendance sass, refactorisation de la gestion des déchet…
atila-1 Nov 20, 2024
ee97b34
Ajout de la dépendance react-tooltip, mise à jour des styles de cercl…
atila-1 Nov 21, 2024
594b422
Ajout du composant CampagneDetails, refactorisation de ModalCampaign …
atila-1 Nov 21, 2024
9150793
Ajout du composant Legend, mise à jour de la gestion des campagnes, r…
atila-1 Nov 27, 2024
03e6355
Mise à jour de la récupération des données de déchets avec des types …
atila-1 Nov 27, 2024
e589149
Refactorisation des styles de cercles de déchets, ajout d'un composan…
atila-1 Nov 27, 2024
ff7a7f7
Nettoyage du code : suppression des logs de débogage, refactorisation…
atila-1 Nov 29, 2024
a0ee73a
Amélioration de la gestion de la carte : ajout d'un état pour le char…
atila-1 Nov 29, 2024
afd5545
Ajout d'un indicateur de chargement pour les données de la carte avec…
atila-1 Nov 29, 2024
741e715
Ajout de la gestion de l'état de l'application pour afficher un indic…
atila-1 Dec 4, 2024
3abcbdf
Amélioration de la gestion des types de déchets dans TrashLayer et mi…
atila-1 Dec 5, 2024
0ef3bab
Mise à jour de la couleur de fond de la barre de progression dans le …
atila-1 Dec 10, 2024
aa2de10
Ajout d'un fichier README pour la documentation du projet et correcti…
atila-1 Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VITE_MAPBOX_ACCESS_TOKEN="pk.eyJ1Ijoic2FiaW5lYWxsb3VzdXJmcmlkZXIiLCJhIjoiY2xnZXY3NWFpMHoyaDNtcDhrYWZscGJ1ZCJ9.I21vKjTW3QIyuwfb19HhDg"
VITE_MAPBOX_API_URL="https://api.mapbox.com/search/searchbox/v1"
VITE_PLASTIC_API="https://api-plastico-prod.azurewebsites.net/v1"
39 changes: 39 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"root": true,
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"standard-with-typescript",
"plugin:import/typescript",
"plugin:prettier/recommended",
"prettier/@typescript-eslint"
],
"parser": "@typescript-eslint/parser",
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["react", "prettier"],
"rules": {
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-submodule-imports": "off",
"@typescript-eslint/no-unused-expressions": "warn",
"@typescript-eslint/jsx-no-lambda": "off",
"@typescript-eslint/prefer-interface": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/camelcase": "off",
"simple-import-sort/sort": "warn",
"no-console": "off",
"sort-keys": "off",
"sort-imports": "off"
}
}
49 changes: 49 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy

on:
push:
branches:
- v2

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Build project
run: npm run build

- name: Upload production-ready build files
uses: actions/upload-artifact@v3
with:
name: production-files
path: ./dist

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/v2'

steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: production-files
path: ./dist

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
dist/
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"tabWidth": 2,
"printWidth": 120,
"singleQuote": true,
"trailingComma": "none",
"jsxBracketSameLine": true
}
21 changes: 21 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"eslint.enable": true,
"eslint.validate": ["javascript", "typescript", "javascriptreact", "typescriptreact"],
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true,
"**/node_modules": true
}
}
25 changes: 25 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Plastic Origin - Map Refacto

## Prérequis

Assurez-vous d'avoir Node.js installé sur votre machine. Vous pouvez le télécharger et l'installer depuis [nodejs.org](https://nodejs.org/).

## Installation

Pour installer les dépendances du projet, exécutez la commande suivante :

```sh
npm install
```

### Build du projet

Pour construire le projet, exécutez la commande suivante :

```
npm run build
```

Cette commande va compiler le projet et générer les fichiers de production dans le dossier dist.

N'oubliez pas de remplacer les sections appropriées par des informations spécifiques à votre projet si nécessaire.
31 changes: 31 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// eslint.config.js
import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin';
import typescriptEslintParser from '@typescript-eslint/parser';
import eslintPluginReact from 'eslint-plugin-react';

export default [
{
ignores: ['node_modules/**']
},
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: typescriptEslintParser
},
plugins: {
react: eslintPluginReact,
'@typescript-eslint': typescriptEslintPlugin
},
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-function-return-type': 'warn'
},
settings: {
react: {
version: 'detect'
}
}
}
];
1 change: 1 addition & 0 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading