♻️ Create languages package (#644)

This commit is contained in:
Luke Vella 2023-04-03 11:04:38 +01:00 committed by GitHub
parent 05fe2edaea
commit d973cbccb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 3 deletions

View file

@ -1,5 +1,5 @@
const path = require("path");
const languages = require("./languages.json");
const languages = require("@rallly/languages/languages.json");
module.exports = {
i18n: {

View file

@ -18,6 +18,7 @@
"dependencies": {
"@rallly/backend": "*",
"@rallly/database": "*",
"@rallly/languages":"*",
"@rallly/tailwind-config": "*",
"@floating-ui/react-dom-interactions": "^0.13.3",
"@headlessui/react": "^1.7.7",

View file

@ -1,11 +1,10 @@
import languages from "@rallly/languages";
import clsx from "clsx";
import Cookies from "js-cookie";
import { useTranslation } from "next-i18next";
import ChevronDown from "@/components/icons/chevron-down.svg";
import languages from "../../../languages.json";
export const LanguageSelect: React.FunctionComponent<{
className?: string;
onChange?: (language: string) => void;

View file

@ -0,0 +1,3 @@
import languages from "./languages.json";
export default languages;

View file

@ -0,0 +1,7 @@
{
"name": "@rallly/languages",
"version": "0.0.0",
"private": true,
"main": "index.ts",
"types": "index.ts"
}

View file

@ -0,0 +1,5 @@
{
"extends": "@rallly/tsconfig/package.json",
"include": ["**/*.ts"],
"exclude": ["node_modules"]
}