mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-01 19:26:30 +02:00
♻️ Create languages package (#644)
This commit is contained in:
parent
05fe2edaea
commit
d973cbccb5
7 changed files with 18 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const languages = require("./languages.json");
|
const languages = require("@rallly/languages/languages.json");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
i18n: {
|
i18n: {
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rallly/backend": "*",
|
"@rallly/backend": "*",
|
||||||
"@rallly/database": "*",
|
"@rallly/database": "*",
|
||||||
|
"@rallly/languages":"*",
|
||||||
"@rallly/tailwind-config": "*",
|
"@rallly/tailwind-config": "*",
|
||||||
"@floating-ui/react-dom-interactions": "^0.13.3",
|
"@floating-ui/react-dom-interactions": "^0.13.3",
|
||||||
"@headlessui/react": "^1.7.7",
|
"@headlessui/react": "^1.7.7",
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
|
import languages from "@rallly/languages";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import { useTranslation } from "next-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
|
|
||||||
import ChevronDown from "@/components/icons/chevron-down.svg";
|
import ChevronDown from "@/components/icons/chevron-down.svg";
|
||||||
|
|
||||||
import languages from "../../../languages.json";
|
|
||||||
|
|
||||||
export const LanguageSelect: React.FunctionComponent<{
|
export const LanguageSelect: React.FunctionComponent<{
|
||||||
className?: string;
|
className?: string;
|
||||||
onChange?: (language: string) => void;
|
onChange?: (language: string) => void;
|
||||||
|
|
3
packages/languages/index.ts
Normal file
3
packages/languages/index.ts
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import languages from "./languages.json";
|
||||||
|
|
||||||
|
export default languages;
|
7
packages/languages/package.json
Normal file
7
packages/languages/package.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"name": "@rallly/languages",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"private": true,
|
||||||
|
"main": "index.ts",
|
||||||
|
"types": "index.ts"
|
||||||
|
}
|
5
packages/languages/tsconfig.json
Normal file
5
packages/languages/tsconfig.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"extends": "@rallly/tsconfig/package.json",
|
||||||
|
"include": ["**/*.ts"],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue