diff --git a/.Dockerignore b/.Dockerignore index 42e2bae..03a5c10 100644 --- a/.Dockerignore +++ b/.Dockerignore @@ -4,4 +4,5 @@ /.next /.gitignore /docker.sh -/build_number \ No newline at end of file +/build_number +/.env* \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1437c53..8414f82 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,5 @@ yarn-error.log* # vercel .vercel + +/.env* \ No newline at end of file diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..5edcff0 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v16 \ No newline at end of file diff --git a/.yarn/cache/@formatjs-ecma402-abstract-npm-1.11.4-98baf4d2cc-05dbe1c645.zip b/.yarn/cache/@formatjs-ecma402-abstract-npm-1.11.4-98baf4d2cc-05dbe1c645.zip new file mode 100644 index 0000000..b142b50 Binary files /dev/null and b/.yarn/cache/@formatjs-ecma402-abstract-npm-1.11.4-98baf4d2cc-05dbe1c645.zip differ diff --git a/.yarn/cache/@formatjs-intl-localematcher-npm-0.2.25-6e304157f3-ee00ddc233.zip b/.yarn/cache/@formatjs-intl-localematcher-npm-0.2.25-6e304157f3-ee00ddc233.zip new file mode 100644 index 0000000..f81b1fd Binary files /dev/null and b/.yarn/cache/@formatjs-intl-localematcher-npm-0.2.25-6e304157f3-ee00ddc233.zip differ diff --git a/.yarn/cache/@popperjs-core-npm-2.11.5-a338f16bd4-fd7f9dca3f.zip b/.yarn/cache/@popperjs-core-npm-2.11.5-a338f16bd4-fd7f9dca3f.zip new file mode 100644 index 0000000..e52b2d6 Binary files /dev/null and b/.yarn/cache/@popperjs-core-npm-2.11.5-a338f16bd4-fd7f9dca3f.zip differ diff --git a/.yarn/cache/@types-react-datepicker-npm-4.1.7-620559a094-e1c7beb78e.zip b/.yarn/cache/@types-react-datepicker-npm-4.1.7-620559a094-e1c7beb78e.zip deleted file mode 100644 index 128d44c..0000000 Binary files a/.yarn/cache/@types-react-datepicker-npm-4.1.7-620559a094-e1c7beb78e.zip and /dev/null differ diff --git a/.yarn/cache/@types-react-datepicker-npm-4.4.1-618b6a94ad-f63ba9288c.zip b/.yarn/cache/@types-react-datepicker-npm-4.4.1-618b6a94ad-f63ba9288c.zip new file mode 100644 index 0000000..db47408 Binary files /dev/null and b/.yarn/cache/@types-react-datepicker-npm-4.4.1-618b6a94ad-f63ba9288c.zip differ diff --git a/.yarn/cache/axios-npm-0.26.1-a6641ce4e3-d9eb58ff4b.zip b/.yarn/cache/axios-npm-0.26.1-a6641ce4e3-d9eb58ff4b.zip new file mode 100644 index 0000000..35d97b5 Binary files /dev/null and b/.yarn/cache/axios-npm-0.26.1-a6641ce4e3-d9eb58ff4b.zip differ diff --git a/.yarn/cache/dotenv-npm-16.0.0-ef4a5ccded-664cebb51f.zip b/.yarn/cache/dotenv-npm-16.0.0-ef4a5ccded-664cebb51f.zip new file mode 100644 index 0000000..c6b1b5c Binary files /dev/null and b/.yarn/cache/dotenv-npm-16.0.0-ef4a5ccded-664cebb51f.zip differ diff --git a/.yarn/cache/follow-redirects-npm-1.14.9-522f191631-f5982e0eb4.zip b/.yarn/cache/follow-redirects-npm-1.14.9-522f191631-f5982e0eb4.zip new file mode 100644 index 0000000..6159743 Binary files /dev/null and b/.yarn/cache/follow-redirects-npm-1.14.9-522f191631-f5982e0eb4.zip differ diff --git a/.yarn/cache/next-intl-npm-2.0.0-154b9fb8a1-c809fd7289.zip b/.yarn/cache/next-intl-npm-2.0.0-154b9fb8a1-c809fd7289.zip deleted file mode 100644 index dedf477..0000000 Binary files a/.yarn/cache/next-intl-npm-2.0.0-154b9fb8a1-c809fd7289.zip and /dev/null differ diff --git a/.yarn/cache/next-intl-npm-2.6.0-682f13bd6c-abd009cb6d.zip b/.yarn/cache/next-intl-npm-2.6.0-682f13bd6c-abd009cb6d.zip new file mode 100644 index 0000000..b7490c3 Binary files /dev/null and b/.yarn/cache/next-intl-npm-2.6.0-682f13bd6c-abd009cb6d.zip differ diff --git a/.yarn/cache/next-plausible-npm-2.1.1-00ce65c6c7-1fde1b8931.zip b/.yarn/cache/next-plausible-npm-2.1.1-00ce65c6c7-1fde1b8931.zip deleted file mode 100644 index 316f7c0..0000000 Binary files a/.yarn/cache/next-plausible-npm-2.1.1-00ce65c6c7-1fde1b8931.zip and /dev/null differ diff --git a/.yarn/cache/next-plausible-npm-3.1.9-cc055ad0e4-b138908311.zip b/.yarn/cache/next-plausible-npm-3.1.9-cc055ad0e4-b138908311.zip new file mode 100644 index 0000000..df632f1 Binary files /dev/null and b/.yarn/cache/next-plausible-npm-3.1.9-cc055ad0e4-b138908311.zip differ diff --git a/.yarn/cache/use-intl-npm-2.0.0-9d20e2b2e2-c12f265bf1.zip b/.yarn/cache/use-intl-npm-2.0.0-9d20e2b2e2-c12f265bf1.zip deleted file mode 100644 index 44cc74c..0000000 Binary files a/.yarn/cache/use-intl-npm-2.0.0-9d20e2b2e2-c12f265bf1.zip and /dev/null differ diff --git a/.yarn/cache/use-intl-npm-2.6.0-c3893acf77-f16a4aeab2.zip b/.yarn/cache/use-intl-npm-2.6.0-c3893acf77-f16a4aeab2.zip new file mode 100644 index 0000000..dc06e99 Binary files /dev/null and b/.yarn/cache/use-intl-npm-2.6.0-c3893acf77-f16a4aeab2.zip differ diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index 96aff25..e9d5ea0 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/components/heading.tsx b/components/heading.tsx deleted file mode 100644 index a1db2ea..0000000 --- a/components/heading.tsx +++ /dev/null @@ -1,6 +0,0 @@ - -export function Heading({children}: {children: React.ReactNode}) { - return ( -

{children}

- ); -} \ No newline at end of file diff --git a/components/index.ts b/components/index.ts deleted file mode 100644 index d5cd363..0000000 --- a/components/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./title"; -export * from "./linkcard"; -export * from "./paragraph"; -export * from "./heading"; \ No newline at end of file diff --git a/components/linkcard.tsx b/components/linkcard.tsx deleted file mode 100644 index b4a671f..0000000 --- a/components/linkcard.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import Link from "next/link"; - -export function LinkCard(props: { - link: string; - title: string; - sub: string; -}) { - const { link, title, sub } = props; - return ( - - -

{title} →

-

{sub}

-
- - ); -} \ No newline at end of file diff --git a/components/paragraph.tsx b/components/paragraph.tsx deleted file mode 100644 index aca59b8..0000000 --- a/components/paragraph.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from "react"; - -export function Paragraph ({children}: {children: React.ReactNode}) { - return ( -

- {children} -

- ) -} \ No newline at end of file diff --git a/components/title.tsx b/components/title.tsx deleted file mode 100644 index 7d3cd8a..0000000 --- a/components/title.tsx +++ /dev/null @@ -1,6 +0,0 @@ - -export function Title({ children, ...props }: { children: React.ReactNode }) { - return ( -

{children}

- ); -} \ No newline at end of file diff --git a/next-env.d.ts b/next-env.d.ts deleted file mode 100644 index 4f11a03..0000000 --- a/next-env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/next.config.js b/next.config.js deleted file mode 100644 index 7e4df50..0000000 --- a/next.config.js +++ /dev/null @@ -1,21 +0,0 @@ -const { i18n } = require('./next-i18next.config'); - -module.exports = { - swcMinify: true, - i18n, - reactStrictMode: true, - rewrites: [ - { - source: '/fonts/ubuntu', - destination: 'https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;700&display=swap' - }, - { - source: '/fonts/goog/api', - destination: 'https://fonts.googleapis.com' - }, - { - source: '/fonts/goog/static', - destination: 'https://fonts.gstatic.com' - }, - ] -} diff --git a/package.json b/package.json index d1d2d21..bc1b935 100644 --- a/package.json +++ b/package.json @@ -9,22 +9,11 @@ "lint": "next lint" }, "dependencies": { - "autoprefixer": "^10.3.3", "moment": "^2.29.1", - "next": "12", - "next-intl": "^2.0.0", - "next-plausible": "^2.1.1", "postcss": "^8.3.6", - "react": "latest", - "react-copy-to-clipboard": "^5.0.4", - "react-datepicker": "^4.2.1", - "react-dom": "latest", "tailwindcss": "^2.2.9" }, "devDependencies": { - "@types/react": "17.0.14", - "@types/react-copy-to-clipboard": "^5.0.1", - "@types/react-datepicker": "^4.1.7", "eslint": "7.31.0", "eslint-config-next": "11.0.1", "typescript": "4.3.5" diff --git a/pages/_app.tsx b/pages/_app.tsx deleted file mode 100644 index af23fb8..0000000 --- a/pages/_app.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import '../styles/globals.css' -import type { AppProps } from 'next/app' -import {NextIntlProvider} from 'next-intl'; -import PlausibleProvider from 'next-plausible'; -import Head from 'next/head'; - -function _App({ Component, pageProps }: AppProps) { - return ( - <> - - Vänner Bäst | Friends Best - - - - - - - - - - - - - - - - - - ) -} -export default _App diff --git a/pages/birthdays.tsx b/pages/birthdays.tsx deleted file mode 100644 index 24d4595..0000000 --- a/pages/birthdays.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { Title, Paragraph, Heading } from "../components"; -import DatePicker from 'react-datepicker' -import { useState } from "react"; -import "react-datepicker/dist/react-datepicker.css" -import CopyToClipboard from "react-copy-to-clipboard"; -import moment from "moment"; -import Head from "next/head"; - -export default function BirthdaysPage() { - const [date, setDate] = useState(new Date()); - const [copied, setCopied] = useState("Copy!"); - return ( - <> - - - - -
- Birthdays - You can generate your birthday command here for UtiliBots' birthday bot. - I was born on the... - The format is DD/MM. - {setDate(date); setCopied("Copy!");} - } - dateFormat="dd/MM" /> - Command to set your birthday: - {`/set-birthday ${Intl.DateTimeFormat().resolvedOptions().timeZone} ${moment(date).format("MM/DD")}`} - setCopied("Copied!")} text={`/set-birthday ${Intl.DateTimeFormat().resolvedOptions().timeZone} ${moment(date).format("MM/DD")}`}> - - -
- - ); -} \ No newline at end of file diff --git a/pages/index.tsx b/pages/index.tsx deleted file mode 100644 index b4bdfc9..0000000 --- a/pages/index.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import Head from 'next/head' -import { useTranslations } from 'next-intl' -import { GetStaticPropsContext, InferGetStaticPropsType } from 'next' -import Image from 'next/image' -import {LinkCard, Title} from '../components' - -export function getStaticProps({locale}: GetStaticPropsContext) { - return { - props: { - // You can get the messages from anywhere you like, but the recommended - // pattern is to put them in JSON files separated by language and read - // the desired one based on the `locale` received from Next.js. - messages: require(`../locales/${locale}.json`), - } - }; -} - -export default function Home() { - const t = useTranslations('common') - return ( -
- - - - - -
- - {t('welcome')} - -

- {t('desc')} -

-
- - - - - -
-
-
- ) -} diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index 33ad091..0000000 --- a/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 0000000..c567520 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,10 @@ +module.exports = { + trailingComma: "es5", + tabWidth: 4, + semi: true, + singleQuote: true, + useTabs: true, + jsxBracketSameLine: true, + arrowParens: "avoid", + insertPragma: false +}; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 04918f4..9914601 100644 --- a/yarn.lock +++ b/yarn.lock @@ -130,6 +130,16 @@ __metadata: languageName: node linkType: hard +"@formatjs/ecma402-abstract@npm:^1.11.4": + version: 1.11.4 + resolution: "@formatjs/ecma402-abstract@npm:1.11.4" + dependencies: + "@formatjs/intl-localematcher": 0.2.25 + tslib: ^2.1.0 + checksum: 05dbe1c6457acfe9cdc0fc770940260e19fa588be6c655b1ff1697506348dac1eee9b249b64e6544531174d07a5a74a9e75f68430947cfdc074ebe8e3c86f86f + languageName: node + linkType: hard + "@formatjs/fast-memoize@npm:1.1.1": version: 1.1.1 resolution: "@formatjs/fast-memoize@npm:1.1.1" @@ -158,6 +168,15 @@ __metadata: languageName: node linkType: hard +"@formatjs/intl-localematcher@npm:0.2.25": + version: 0.2.25 + resolution: "@formatjs/intl-localematcher@npm:0.2.25" + dependencies: + tslib: ^2.1.0 + checksum: ee00ddc23317dc47a58831aaca5112e101d8bb1f38adc0ecfe1a9d7e008d0bb1091519f07e1d7d805b0c1e28f2c3e75f697ae479e22423445814412c7669284c + languageName: node + linkType: hard + "@gar/promisify@npm:^1.0.1": version: 1.1.2 resolution: "@gar/promisify@npm:1.1.2" @@ -400,6 +419,13 @@ __metadata: languageName: node linkType: hard +"@popperjs/core@npm:^2.11.5": + version: 2.11.5 + resolution: "@popperjs/core@npm:2.11.5" + checksum: fd7f9dca3fb716d7426332b6ee283f88d2724c0ab342fb678865a640bad403dfb9eeebd8204a406986162f7e2b33394f104320008b74d0e9066d7322f70ea35d + languageName: node + linkType: hard + "@popperjs/core@npm:^2.9.2": version: 2.10.1 resolution: "@popperjs/core@npm:2.10.1" @@ -451,15 +477,15 @@ __metadata: languageName: node linkType: hard -"@types/react-datepicker@npm:^4.1.7": - version: 4.1.7 - resolution: "@types/react-datepicker@npm:4.1.7" +"@types/react-datepicker@npm:latest": + version: 4.4.1 + resolution: "@types/react-datepicker@npm:4.4.1" dependencies: "@popperjs/core": ^2.9.2 "@types/react": "*" date-fns: ^2.0.1 react-popper: ^2.2.5 - checksum: e1c7beb78e31c49bc4cab0904a02e5d2fc3945e8314b248219b13bc5acf9604347ec0e0a3b511146ce0b8cdb86b11f9f93b5c0b089e43f6ea92caf3e2e11b600 + checksum: f63ba9288cc04b3c2174edbed9004f9253c23a6e9303bf515d4f349379b83db89e3117ef0907afcfa07eb0a0662d8fe30071faca0ae3f8f869091cddd38e292b languageName: node linkType: hard @@ -886,6 +912,15 @@ __metadata: languageName: node linkType: hard +"axios@npm:^0.26.1": + version: 0.26.1 + resolution: "axios@npm:0.26.1" + dependencies: + follow-redirects: ^1.14.8 + checksum: d9eb58ff4bc0b36a04783fc9ff760e9245c829a5a1052ee7ca6013410d427036b1d10d04e7380c02f3508c5eaf3485b1ae67bd2adbfec3683704745c8d7a6e1a + languageName: node + linkType: hard + "axobject-query@npm:^2.2.0": version: 2.2.0 resolution: "axobject-query@npm:2.2.0" @@ -1721,6 +1756,13 @@ __metadata: languageName: node linkType: hard +"dotenv@npm:^16.0.0": + version: 16.0.0 + resolution: "dotenv@npm:16.0.0" + checksum: 664cebb51f0a9a1d1b930f51f0271e72e26d62feaecc9dc03df39453dd494b4e724809ca480fb3ec3213382b1ed3f791aaeb83569a137f9329ce58efd4853dbf + languageName: node + linkType: hard + "electron-to-chromium@npm:^1.3.723": version: 1.3.785 resolution: "electron-to-chromium@npm:1.3.785" @@ -2288,6 +2330,16 @@ __metadata: languageName: node linkType: hard +"follow-redirects@npm:^1.14.8": + version: 1.14.9 + resolution: "follow-redirects@npm:1.14.9" + peerDependenciesMeta: + debug: + optional: true + checksum: f5982e0eb481818642492d3ca35a86989c98af1128b8e1a62911a3410621bc15d2b079e8170b35b19d3bdee770b73ed431a257ed86195af773771145baa57845 + languageName: node + linkType: hard + "foreach@npm:^2.0.5": version: 2.0.5 resolution: "foreach@npm:2.0.5" @@ -2306,21 +2358,25 @@ __metadata: version: 0.0.0-use.local resolution: "friends-best@workspace:." dependencies: + "@popperjs/core": ^2.11.5 "@types/react": 17.0.14 "@types/react-copy-to-clipboard": ^5.0.1 - "@types/react-datepicker": ^4.1.7 + "@types/react-datepicker": latest autoprefixer: ^10.3.3 + axios: ^0.26.1 + dotenv: ^16.0.0 eslint: 7.31.0 eslint-config-next: 11.0.1 moment: ^2.29.1 next: 12 - next-intl: ^2.0.0 - next-plausible: ^2.1.1 + next-intl: ^2.6.0 + next-plausible: ^3.1.9 postcss: ^8.3.6 react: latest react-copy-to-clipboard: ^5.0.4 react-datepicker: ^4.2.1 react-dom: latest + react-popper: ^2.2.5 tailwindcss: ^2.2.9 typescript: 4.3.5 languageName: unknown @@ -3499,26 +3555,26 @@ __metadata: languageName: node linkType: hard -"next-intl@npm:^2.0.0": - version: 2.0.0 - resolution: "next-intl@npm:2.0.0" +"next-intl@npm:^2.6.0": + version: 2.6.0 + resolution: "next-intl@npm:2.6.0" dependencies: - use-intl: ^2.0.0 + use-intl: ^2.6.0 peerDependencies: - next: ^10.0.0 || ^11.0.0 - react: ^16.8.0 || ^17.0.0 - checksum: c809fd72896fad6c5143f802fa5644fee910881c61dc7c53271355bd6233340589a662a8ae788b33adc2090f0c439ba19df52d06370da27bd8d93a37fd641b82 + next: ^10.0.0 || ^11.0.0 || ^12.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: abd009cb6deb474b014124f73435a136f1a3910d18a6f8145cf6ca58138e9a58d5c1612adf316f0b744e84813c7e064eb583bdd0946af2933c81f13a4c7240d0 languageName: node linkType: hard -"next-plausible@npm:^2.1.1": - version: 2.1.1 - resolution: "next-plausible@npm:2.1.1" +"next-plausible@npm:^3.1.9": + version: 3.1.9 + resolution: "next-plausible@npm:3.1.9" peerDependencies: - next: ^9.4.0 || ^10.0.0 || ^11.0.0 - react: ^16.8.0 || ^17.0.0 - react-dom: ^16.8.0 || ^17.0.0 - checksum: 1fde1b8931dd74cade9cf1ffeaa4d68cad39f8b4c72888e88e0a10f67eee76ddcc499b79d2a5ce45e07f96666082514af6296113c310b6ed6f74dd67bb4424ca + next: ^11.1.0 || ^12.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: b13890831173f82e02a21ff593f43f76e2139eb18aab2cc09c037aee24fc3893fa7eaf6e1181fb4152de78a6e32fcd1f7b3ccd84985b262b1a918ae0a8f85aad languageName: node linkType: hard @@ -5450,14 +5506,15 @@ typescript@4.3.5: languageName: node linkType: hard -"use-intl@npm:^2.0.0": - version: 2.0.0 - resolution: "use-intl@npm:2.0.0" +"use-intl@npm:^2.6.0": + version: 2.6.0 + resolution: "use-intl@npm:2.6.0" dependencies: + "@formatjs/ecma402-abstract": ^1.11.4 intl-messageformat: ^9.3.18 peerDependencies: - react: ^16.8.0 || ^17.0.0 - checksum: c12f265bf1c7d06adbe9917bacb9e32c77a6a746fdcdb9de9d774003c1fc074137d4796c4658604ce8d15611694b77a1d8f781e539716ce6baac915438ed3141 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: f16a4aeab2a06c2362d1f63a467ca8df6566fa8114c3b7cc5482e18418eb15b6172e1293e8e12a3313a24b281b145f13e12922c79675ae69bfcd4215710f951c languageName: node linkType: hard