fix linter
This commit is contained in:
parent
e14421ccc0
commit
b44357f2a5
|
@ -1,7 +1,3 @@
|
|||
{
|
||||
"extends": [
|
||||
"next/core-web-vitals",
|
||||
"molindo/typescript",
|
||||
"molindo/react"
|
||||
]
|
||||
"extends": ["eslint:recommended", "next/core-web-vitals"]
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -19,12 +19,12 @@
|
|||
"styled-components": "^6.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/eslint-plugin-next": "^14.0.4",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"autoprefixer": "^10.0.1",
|
||||
"eslint": "^8.55.0",
|
||||
"eslint-config-molindo": "^7.0.0",
|
||||
"eslint-config-next": "^14.0.3",
|
||||
"postcss": "^8",
|
||||
"sass": "^1.69.5",
|
||||
|
|
|
@ -34,7 +34,7 @@ export default function Experts() {
|
|||
}}
|
||||
dataSource={data}
|
||||
renderItem={(item) => (
|
||||
<List.Item key={item.title}>
|
||||
<List.Item key={item.name}>
|
||||
<List.Item.Meta
|
||||
avatar={<Avatar src={item.avatar} />}
|
||||
title={item.name}
|
||||
|
@ -55,7 +55,7 @@ export default function Experts() {
|
|||
<div className="card-profile__subtitle">{item.specialityDesc}</div>
|
||||
<div className="card-profile__desc">{item.description}</div>
|
||||
<div className="card-profile__footer">
|
||||
<Link href={item.href}>
|
||||
<Link href={item.href as any}>
|
||||
<Text
|
||||
copyable={{
|
||||
icon: <RightOutlined key="copy-icon" style={{ fontSize: '15px' }}/>,
|
||||
|
|
|
@ -6,12 +6,13 @@ const ROUTES = ['sessions', 'notifications', 'support', 'information', 'settings
|
|||
|
||||
export const AccountMenu = () => {
|
||||
const t = useTranslations('Account');
|
||||
const userId = 5;
|
||||
|
||||
return (
|
||||
<ul>
|
||||
{ROUTES.map((item) => (
|
||||
<li key={item}>
|
||||
<Link href={`/account/${item}`}>
|
||||
<Link href={`/${userId}/${item}` as any}>
|
||||
{t(`menu.${item}`)}
|
||||
</Link>
|
||||
</li>
|
||||
|
|
|
@ -124,7 +124,7 @@ export const ExpertsFilter = () => {
|
|||
})
|
||||
}, [filter]);
|
||||
|
||||
const getList = useCallback((data) => (
|
||||
const getList = useCallback((data: any[]) => (
|
||||
<div className="b-filter__inner">
|
||||
<List
|
||||
itemLayout="vertical"
|
||||
|
|
|
@ -36,7 +36,7 @@ export const Footer = () => {
|
|||
<div className="b-footer__coll-2">
|
||||
<div className="b-footer__coll-2__item">
|
||||
{FOOTER_ROUTES.map((item) => (
|
||||
<Link key={item} href={`/${item}`} className="b-footer__link">{t(`menu.${item}`)}</Link>
|
||||
<Link key={item} href={`/${item}` as any} className="b-footer__link">{t(`menu.${item}`)}</Link>
|
||||
))}
|
||||
</div>
|
||||
<div className="b-footer__social">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { HeaderAuthLinks } from './HeaderAuthLinks';
|
||||
|
||||
export const HeaderMenu = ({ children }) => (
|
||||
export const HeaderMenu = ({ children }: { children: ReactNode }) => (
|
||||
<div className="b-header__nav">
|
||||
<nav>
|
||||
<ul className="b-header__nav__list ">
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
'use client'
|
||||
|
||||
import React, {FC, useState} from 'react';
|
||||
import React, { FC, ReactNode, useState } from 'react';
|
||||
import { HeaderAuthLinks } from './HeaderAuthLinks';
|
||||
|
||||
type HeaderMenuMobileProps = {
|
||||
open: boolean;
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
export const HeaderMobileMenu: FC<HeaderMenuMobileProps> = ({ open, children }) => {
|
||||
export const HeaderMobileMenu: FC<HeaderMenuMobileProps> = ({ children }) => {
|
||||
const [showMobileMenu, setShowMobileMenu] = useState<boolean>(false);
|
||||
|
||||
return (
|
||||
|
@ -19,7 +19,7 @@ export const HeaderMobileMenu: FC<HeaderMenuMobileProps> = ({ open, children })
|
|||
alt=""
|
||||
/>
|
||||
</div>
|
||||
{open ? (
|
||||
{showMobileMenu ? (
|
||||
<div className="menu-mobile">
|
||||
<div className="menu-mobile__inner">
|
||||
<div className="menu-mobile__header">
|
||||
|
|
|
@ -16,7 +16,7 @@ export const LanguageSwitcher = ({ locale }: { locale: string }) => {
|
|||
|
||||
const onClick: MenuProps['onClick'] = (e) => {
|
||||
startTransition(() => {
|
||||
router.replace(pathname, { locale: e.key });
|
||||
router.replace(pathname as any, { locale: e.key });
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ export const Header: FC<HeaderProps> = ({ locale }) => {
|
|||
|
||||
const routes = HEAD_ROUTES.map((item) => (
|
||||
<li key={item}>
|
||||
<Link href={`/${item}`}>{t(`menu.${item}`)}</Link>
|
||||
<Link href={`/${item}` as any}>{t(`menu.${item}`)}</Link>
|
||||
</li>
|
||||
));
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { AdditionalFilter, Filter } from '../types/experts';
|
||||
import { LOCALES } from "./locale";
|
||||
import { LOCALES } from './locale';
|
||||
|
||||
export enum FilterType {
|
||||
'WorkLifeBalance' = 'workLifeBalance',
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
import { createLocalizedPathnamesNavigation } from 'next-intl/navigation';
|
||||
import { createLocalizedPathnamesNavigation, Pathnames } from 'next-intl/navigation';
|
||||
import { ALLOWED_LOCALES, LOCALE_PREFIX } from './constants/locale';
|
||||
|
||||
export const { Link, redirect, usePathname, useRouter } =
|
||||
createLocalizedPathnamesNavigation({
|
||||
locales: ALLOWED_LOCALES,
|
||||
pathnames: {
|
||||
'/': '/'
|
||||
},
|
||||
'/': '/',
|
||||
'/experts': '/experts',
|
||||
'/experts/[expertId]': '/experts/[expertId]',
|
||||
'/news': '/news',
|
||||
'/privacy-policy': '/privacy-policy',
|
||||
'/[userId]': '/[userId]',
|
||||
'/[userId]/[...slug]': '/[userId]/[...slug]',
|
||||
} satisfies Pathnames<typeof ALLOWED_LOCALES>,
|
||||
localePrefix: LOCALE_PREFIX
|
||||
});
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "eslint-config-molindo/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"target": "es5",
|
||||
|
|
Loading…
Reference in New Issue