Skip to content

Latest commit

 

History

History
67 lines (43 loc) · 1.35 KB

README.md

File metadata and controls

67 lines (43 loc) · 1.35 KB

Installing and Running

  1. Clone repository

    git clone [email protected]:eraygundogmus/cHJvcGVydGktdGFza2Nhc2U.git
  2. Go to folder, and copy .env.example as .env.

    cd cHJvcGVydGktdGFza2Nhc2U/
    cp .env.example .env
  3. Fill the .env file with your own values.

  4. Install dependencies recommended to use pnpm but you can use npm or yarn as well.

    pnpm install
  5. Run the development server:

    pnpm dev

    Open http://localhost:3000 with your browser to see the result.

Running Tests

To run e2e tests, you can use the following command:

pnpm e2e

To run unit tests, you can use the following command:

pnpm unit

Features

Translation Function

To use the i18n t (translate) function, you can import the useTranslation hook from the @/services/i18n/client module.

import { useTranslation } from "@/services/i18n/client";

const { t } = useTranslation("home");

To add a new translation, you can add a new key-value pair to the locales object in the @/services/i18n/locales module. Or you can add a new locale file to the @/services/i18n/locales folder.

Toaster

To use the toaster, you can use the following methods:

import { toast } from "sonner";

toast("message");