8000 Add a missing country in the list of countries · Issue #80 · ln-dev7/world-portfolios · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Add a missing country in the list of countries #80
Open
@ln-dev7

Description

@ln-dev7

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0