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

Add a missing country in the list of countries #80

Open
ln-dev7 opened this issue Jul 16, 2023 · 5 comments
Open

Add a missing country in the list of countries #80

ln-dev7 opened this issue Jul 16, 2023 · 5 comments
Labels
good first issue Good for newcomers

Comments

@ln-dev7
Copy link
Owner

ln-dev7 commented Jul 16, 2023

The goal is just to add as many countries as possible to the list

Guidelines

  1. Make sure that the country you want to add does not already exist, check in: /helpers/countries.ts

  2. If it does not exist, the first thing is to add it to the table countries present in /helpers/countries.ts.
    The modified file should look like this :

import type Country from "@/interfaces/country.interface";
import { cmData } from "@/data/cmData";
...
import { [code]Data } from "@/data/[code]Data";

const countries: Country[] = [
  ...,
  {
    name: "Your Country ",
    code: "Code of your country",
    numberCode: "Numero code of your country",
    flag: "/assets/images/[code]/flag.png",
    portfolios: [code]Data
  },
];

export default countries.sort((a, b) => a.name.localeCompare(b.name))
  1. Go to /public/assets/images and create a folder that will have the country code name, for example : if the country is Cameroon you will have to create a cm folder if it is Italy it will be it

  2. In the folder you just created you must add the flag of your country, it must have for extension a .png and it must be called flag so basically flag.png

  3. In the same file, you must create a card-portfolio.png file that will represent the country card. To do this, you must go to this figma file to generate the card in question. If you have trouble creating the card on figma, leave me a message on twitter ( By sending me the message, be explicit and tell me which country you want to add and I will create the corresponding card, then I will send you )

To modify the figma you must duplicate it in your draft before doing so

Capture d’écran 2023-07-17 à 11 20 32
  1. Go to /data and create a [codeCountry]Data.ts. For example, if the country is France you will have to create a frData.ts file, if it is the allenagne it will be deData.ts

  2. In this file write this :

import type CountryData from "@/interfaces/countryData.interface";

const [codeCountry]Data: CountryData[] = [];

export {[codeCountry]Data};

An example if you add Germany will be :

import type CountryData from "@/interfaces/countryData.interface";

const deData: CountryData[] = [];

export {deData};

If you want to take the opportunity to add a portfolio to the list, I suggest you follow these instructions : follow this guide.

  1. It’s over! You can push and submit your pull request
@ln-dev7 ln-dev7 added the good first issue Good for newcomers label Jul 16, 2023
@dv970406
Copy link
Contributor

Can I work on this issue? if you ok, is there a dead line?🤔

@ln-dev7
Copy link
Owner Author

ln-dev7 commented Jul 16, 2023

@dv970406 - Of course with pleasure:)
No deadline, take your time

Follow this : #80 (comment)

@ln-dev7 ln-dev7 changed the title Add a missing payee in the list of countries Add a missing country in the list of countries Jul 16, 2023
@dv970406
Copy link
Contributor

@ln-dev7 - Thank you :)
I'm working on this, but when I enter figma, I can't make any card because it was only view.
please, make south korea card🇰🇷

And, I gonna make USA🇺🇸(although not my country). please make it too!

@ln-dev7
Copy link
Owner Author

ln-dev7 commented Jul 17, 2023

hello @dv970406
You can copy the figma into your draft before editing it (I say for the next few times)
us
kr

@issa2580
Copy link
Contributor

I worked on adding a missing country, namely Guinea, and regarding the portfolio data, I put my personal data temporally because I am not Guinean but Senegalese because I have already added my portfolio for Senegal. you can try to check #119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants