Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
devianllert committed Aug 6, 2023
2 parents 51fea50 + 49b4150 commit 3ecef01
Show file tree
Hide file tree
Showing 45 changed files with 3,892 additions and 3,738 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
// Recommended to be added last after all other "recommended" tools - See https://nextjs.org/docs/basic-features/eslint#disabling-rules
Expand Down
2 changes: 2 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"^(next/(.*)$)|^(next$)",
"<THIRD_PARTY_MODULES>",
"",
"^@/root/(.*)$",
"",
"^@/app/(.*)$",
"",
"^@/pages/(.*)$",
Expand Down
7 changes: 4 additions & 3 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const withBundleAnalyzer = bundleAnalyzer({

const trueEnv = ['true', '1', 'yes'];

const NEXT_DISABLE_SENTRY = !process.env.NEXT_PUBLIC_SENTRY_DSN || trueEnv.includes(process.env?.NEXT_DISABLE_SENTRY ?? 'false');
const NEXT_DISABLE_SENTRY =
!process.env.NEXT_PUBLIC_SENTRY_DSN || trueEnv.includes(process.env?.NEXT_DISABLE_SENTRY ?? 'false');
const NEXT_SENTRY_DEBUG = trueEnv.includes(process.env?.NEXT_SENTRY_DEBUG ?? 'false');
const NEXT_SENTRY_TRACING = trueEnv.includes(process.env?.NEXT_SENTRY_TRACING ?? 'false');

Expand Down Expand Up @@ -68,8 +69,8 @@ const nextConfig = {
base-uri 'none';
worker-src 'self' blob:;
connect-src 'self' *.dvnllrt.com ${process.env.VERCEL_URL} ${
process.env.NEXT_PUBLIC_API_ENDPOINT
} *.sentry.io https://vitals.vercel-insights.com https://wttr.in https://api.logflare.app;
process.env.NEXT_PUBLIC_API_ENDPOINT
} *.sentry.io https://vitals.vercel-insights.com https://wttr.in https://api.logflare.app;
default-src 'self';
img-src 'self' https://images.unsplash.com https://placehold.co blob: data:;
script-src 'self' 'unsafe-inline' ${process.env.NODE_ENV === 'development' ? "'unsafe-eval'" : ''};
Expand Down
86 changes: 44 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,45 +45,45 @@
"@effector/next": "0.5.0",
"@emotion/react": "11.11.0",
"@emotion/styled": "11.11.0",
"@faker-js/faker": "7.6.0",
"@faker-js/faker": "8.0.2",
"@farfetched/core": "0.8.12",
"@farfetched/react": "0.5.1",
"@fontsource/inter": "5.0.1",
"@next/env": "13.4.3",
"@radix-ui/colors": "0.1.8",
"@radix-ui/colors": "1.0.0",
"@radix-ui/react-alert-dialog": "1.0.3",
"@radix-ui/react-dialog": "1.0.3",
"@radix-ui/react-dropdown-menu": "2.0.4",
"@radix-ui/react-scroll-area": "1.0.3",
"@sentry/nextjs": "7.55.2",
"@sentry/nextjs": "7.60.0",
"axios": "1.4.0",
"date-fns": "2.30.0",
"deepmerge": "4.3.1",
"effector": "22.8.6",
"effector-react": "22.5.3",
"effector-storage": "6.0.0",
"framer-motion": "10.12.12",
"i18next": "22.5.0",
"effector-storage": "6.1.1",
"framer-motion": "10.15.0",
"i18next": "23.4.1",
"jwt-decode": "3.1.2",
"msw": "1.2.1",
"next": "13.4.3",
"next": "13.4.12",
"next-cookies": "2.0.3",
"next-i18next": "13.3.0",
"next-pwa": "5.6.0",
"next-safe": "3.4.1",
"next-sitemap": "4.1.3",
"nprogress": "0.2.0",
"pathpida": "0.20.1",
"patronum": "1.18.0",
"pathpida": "0.21.0",
"patronum": "1.19.1",
"picocolors": "1.0.0",
"pino": "8.14.1",
"pino-logflare": "0.4.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-error-boundary": "4.0.4",
"react-i18next": "12.3.1",
"react-icons": "4.9.0",
"react-wrap-balancer": "^1.0.0",
"react-icons": "4.10.1",
"sharp": "0.32.1",
"timeago-react": "3.0.6",
"timeago.js": "4.0.2",
Expand All @@ -96,66 +96,68 @@
"@emotion/babel-plugin": "11.11.0",
"@emotion/babel-preset-css-prop": "11.11.0",
"@emotion/jest": "11.11.0",
"@ianvs/prettier-plugin-sort-imports": "4.0.2",
"@ianvs/prettier-plugin-sort-imports": "4.1.0",
"@next/bundle-analyzer": "13.4.3",
"@next/eslint-plugin-next": "13.4.3",
"@storybook/addon-a11y": "7.0.13",
"@storybook/addon-actions": "7.0.13",
"@storybook/addon-a11y": "7.1.0",
"@storybook/addon-actions": "7.1.0",
"@storybook/addon-console": "2.0.0",
"@storybook/addon-essentials": "7.0.13",
"@storybook/addon-interactions": "7.0.13",
"@storybook/addon-jest": "7.0.13",
"@storybook/addon-links": "7.0.13",
"@storybook/addons": "7.0.13",
"@storybook/blocks": "7.0.13",
"@storybook/builder-webpack5": "7.0.13",
"@storybook/nextjs": "7.0.13",
"@storybook/react": "7.0.13",
"@storybook/react-webpack5": "7.0.13",
"@storybook/testing-library": "0.1.0",
"@storybook/theming": "7.0.13",
"@testing-library/jest-dom": "5.16.5",
"@storybook/addon-essentials": "7.1.0",
"@storybook/addon-interactions": "7.1.0",
"@storybook/addon-jest": "7.1.0",
"@storybook/addon-links": "7.1.0",
"@storybook/addons": "7.1.0",
"@storybook/blocks": "7.1.0",
"@storybook/builder-webpack5": "7.1.0",
"@storybook/nextjs": "7.1.0",
"@storybook/react": "7.1.0",
"@storybook/react-webpack5": "7.1.0",
"@storybook/testing-library": "0.2.0",
"@storybook/theming": "7.1.0",
"@testing-library/jest-dom": "5.17.0",
"@testing-library/react": "14.0.0",
"@testing-library/react-hooks": "8.0.1",
"@testing-library/user-event": "14.4.3",
"@types/jest": "29.5.1",
"@types/jest-axe": "3.5.5",
"@types/jest-expect-message": "1.1.0",
"@types/next-pwa": "5.6.3",
"@types/node": "20.2.1",
"@types/node": "20.4.8",
"@types/nprogress": "0.2.0",
"@types/react": "18.2.6",
"@types/react-dom": "18.2.4",
"@types/uuid": "9.0.1",
"@typescript-eslint/eslint-plugin": "5.59.7",
"@typescript-eslint/parser": "5.59.7",
"@types/react": "18.2.18",
"@types/react-dom": "18.2.7",
"@types/uuid": "9.0.2",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"@welldone-software/why-did-you-render": "7.0.1",
"axe-core": "4.7.1",
"babel-jest": "29.5.0",
"babel-jest": "29.6.1",
"cross-env": "7.0.3",
"eslint": "8.43.0",
"eslint": "8.46.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-typescript": "17.0.0",
"eslint-config-airbnb-typescript": "17.1.0",
"eslint-config-next": "13.4.3",
"eslint-config-prettier": "8.9.0",
"eslint-plugin-effector": "0.10.5",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-import": "2.28.0",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "7.33.0",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "8.0.3",
"jest": "29.5.0",
"jest-axe": "7.0.1",
"jest-environment-jsdom": "29.5.0",
"jest": "29.6.1",
"jest-axe": "8.0.0",
"jest-environment-jsdom": "29.6.1",
"jest-extended": "4.0.0",
"jest-runner-groups": "2.2.0",
"jest-styled-components": "7.1.1",
"jest-to-match-shape-of": "1.3.2",
"lint-staged": "13.2.2",
"ngrok": "4.3.3",
"orval": "6.16.0",
"orval": "6.17.0",
"prettier": "2.8.8",
"standard-version": "9.5.0",
"storybook": "7.0.13",
"storybook": "7.1.0",
"typescript": "5.1.3"
},
"msw": {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/browser-page-bootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const BrowserPageBootstrap = (props: BrowserPageBootstrapProps) => {
<Component
{...injectedPageProps}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// @ts-ignore
error={err}
/>
</LayoutComponent>
Expand Down
3 changes: 2 additions & 1 deletion src/app/components/universal-app-bootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ const UniversalAppBootstrap = (props: Props) => {
}

if (err) {
const error = new Error(`Fatal error - A top-level error was thrown by the application, which caused the Page.props to be lost. \n
const error =
new Error(`Fatal error - A top-level error was thrown by the application, which caused the Page.props to be lost. \n
The page cannot be shown to the end-user, an error page will be displayed.`);
logger.error(error);

Expand Down
4 changes: 1 addition & 3 deletions src/entities/auth/model/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import {
RefreshResult,
RegisterResult,
} from '@/shared/api/api.generated';
import {
$token, RequestError, requestFx, setToken,
} from '@/shared/api/request/request';
import { $token, RequestError, requestFx, setToken } from '@/shared/api/request/request';
import { pushFx } from '@/shared/lib/effector/router';

export const loginFx = createEffect<AuthEmailLoginDto, LoginResult, RequestError>(async (values) => {
Expand Down
4 changes: 1 addition & 3 deletions src/entities/auth/model/refresh.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { createDefer, Defer } from '@effable/misc';
import {
createEffect, createEvent, createStore, sample,
} from 'effector';
import { createEffect, createEvent, createStore, sample } from 'effector';
import decode, { JwtPayload } from 'jwt-decode';

import { $token } from '@/shared/api/request/request';
Expand Down
4 changes: 1 addition & 3 deletions src/features/auth/login/login-form.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import * as React from 'react';
import NextLink from 'next/link';
import {
Box, Button, Divider, Field, Heading, Input, Link, Stack, Text,
} from '@effable/react';
import { Box, Button, Divider, Field, Heading, Input, Link, Stack, Text } from '@effable/react';
import { useUnit } from 'effector-react';
import { useTranslation } from 'next-i18next';

Expand Down
4 changes: 1 addition & 3 deletions src/features/auth/register/register-form.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import NextLink from 'next/link';
import {
Box, Button, Divider, Field, Heading, Input, Link, Stack, Text,
} from '@effable/react';
import { Box, Button, Divider, Field, Heading, Input, Link, Stack, Text } from '@effable/react';
import { useUnit } from 'effector-react';
import { useTranslation } from 'next-i18next';

Expand Down
4 changes: 1 addition & 3 deletions src/features/cookie-consent/cookie-consent.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {
Box, Button, Link, Portal, Text,
} from '@effable/react';
import { Box, Button, Link, Portal, Text } from '@effable/react';
import { useUnit } from 'effector-react';
import { Trans, useTranslation } from 'next-i18next';

Expand Down
8 changes: 2 additions & 6 deletions src/features/new-main-page/demo-item/demo-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import { UrlObject } from 'url';
import * as React from 'react';
import Image from 'next/image';
import NextLink from 'next/link';
import {
AspectRatio, Badge, Box, Heading, Text,
} from '@effable/react';
import { AspectRatio, Badge, Box, Heading, Text } from '@effable/react';

export interface DemoItemProps {
title: string;
Expand All @@ -14,9 +12,7 @@ export interface DemoItemProps {
}

export const DemoItem = (props: DemoItemProps) => {
const {
title, description, preview, link,
} = props;
const { title, description, preview, link } = props;

return (
<Box
Expand Down
4 changes: 1 addition & 3 deletions src/features/new-main-page/hero/hero.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import * as React from 'react';
import {
Box, Button, Heading, SimpleGrid, Stack, Text,
} from '@effable/react';
import { Box, Button, Heading, SimpleGrid, Stack, Text } from '@effable/react';
import { useTranslation } from 'next-i18next';

import { DignityGrid } from '@/features/new-main-page/dignity-grid';
Expand Down
8 changes: 2 additions & 6 deletions src/features/new-main-page/why-nextplate/why-nextplate.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import * as React from 'react';
import {
Box, Code, Container, Heading, SimpleGrid,
} from '@effable/react';
import { Box, Code, Container, Heading, SimpleGrid } from '@effable/react';
import { Trans, useTranslation } from 'next-i18next';
import {
RiEyeFill, RiFlashlightFill, RiSettings3Fill, RiStarFill,
} from 'react-icons/ri';
import { RiEyeFill, RiFlashlightFill, RiSettings3Fill, RiStarFill } from 'react-icons/ri';

import { Advantage } from '@/features/new-main-page/advantage';

Expand Down
4 changes: 1 addition & 3 deletions src/pages/404.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import React from 'react';
import { GetStaticProps } from 'next';
import Link from 'next/link';
import { useRouter } from 'next/router';
import {
Button, Heading, Stack, Text,
} from '@effable/react';
import { Button, Heading, Stack, Text } from '@effable/react';
import * as Sentry from '@sentry/nextjs';
import { useTranslation } from 'next-i18next';
import { RiArrowRightLine } from 'react-icons/ri';
Expand Down
4 changes: 1 addition & 3 deletions src/pages/_document.page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Document, {
DocumentContext, DocumentInitialProps, Head, Html, Main, NextScript,
} from 'next/document';
import Document, { DocumentContext, DocumentInitialProps, Head, Html, Main, NextScript } from 'next/document';
import { InitializeColorMode } from '@effable/react';

import { CommonMetaTags } from '@/shared/lib/meta';
Expand Down
4 changes: 1 addition & 3 deletions src/pages/_error.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ export type ErrorProps = {
* @see https://github.com/vercel/next.js/discussions/12913 Discussion about hybrid SSG/SSR apps considerations
*/
const ErrorPage = (props: ErrorPageProps) => {
const {
statusCode, isReadyToRender, err, children = null,
} = props;
const { statusCode, isReadyToRender, err, children = null } = props;

if (process.env.NEXT_PUBLIC_APP_STAGE !== 'production') {
console.debug('ErrorPage - Unexpected error caught, it was captured and sent to Sentry. Error details:'); // eslint-disable-line no-console
Expand Down
8 changes: 2 additions & 6 deletions src/pages/dashboard/index.page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {
Avatar, Box, Button, Container, Heading, Stack, Text,
} from '@effable/react';
import { Avatar, Box, Button, Container, Heading, Stack, Text } from '@effable/react';
import { format } from 'date-fns';
import { allSettled, serialize } from 'effector';
import { useUnit } from 'effector-react';
Expand All @@ -18,9 +16,7 @@ import { withAuthenticatedSSP } from '@/shared/lib/ssr';
import { dashboardPageStarted } from './model';

const DashboardPage = () => {
const {
user, update, loading, sessions, logout,
} = useUnit({
const { user, update, loading, sessions, logout } = useUnit({
user: userQuery.$data,
update: userQuery.start,
loading: userQuery.$pending,
Expand Down
Loading

1 comment on commit 3ecef01

@vercel
Copy link

@vercel vercel bot commented on 3ecef01 Aug 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.