Compare commits

...

13 Commits

Author SHA1 Message Date
43bc96bdf6 Removed double request 2022-11-14 12:31:42 +03:00
335218fdd9 Merge pull request 'fix/fetch-article-loop' (#178) from fix/fetch-article-loop into develop
Reviewed-on: http://85.143.176.51:3000/free-land/front-end/pulls/178
2022-11-12 14:11:20 +00:00
35170d4558 Merge pull request 'topic resolved' (#177) from fix/topic into develop
Reviewed-on: http://85.143.176.51:3000/free-land/front-end/pulls/177
2022-11-12 14:10:10 +00:00
5d28da2f0a Merge pull request 'The overlaping in the navbar resolved' (#176) from fix/navbar-overlap into develop
Reviewed-on: http://85.143.176.51:3000/free-land/front-end/pulls/176
2022-11-12 14:09:51 +00:00
f677bffc16 Merge pull request 'fix/burger-translation' (#175) from fix/burger-translation into develop
Reviewed-on: http://85.143.176.51:3000/free-land/front-end/pulls/175
2022-11-12 14:09:29 +00:00
69d09bb8a4 Remove unused imports 2022-11-11 18:58:32 +03:00
d3d1d9d1af Fetch article useCase added 2022-11-11 18:57:16 +03:00
salar.sali
355a9af985 topic resolved 2022-11-11 08:53:01 -05:00
salar.sali
a4a8116d32 The overlaping in the navbar resolved 2022-11-11 05:16:02 -05:00
salar.sali
a4ef589ca9 The translation in burger component resolved 2022-11-11 05:03:34 -05:00
8d3115d878 Updated style for MD code view 2022-11-09 17:35:25 +03:00
eb17ae6377 Merge pull request 'dockerfile-envs fixe, three bugs in select.tsx,typography/Link.tsx, and typography/RouterLink.tsx fixed' (#174) from bugfix/dockerfile-envs into develop
Reviewed-on: http://85.143.176.51:3000/free-land/front-end/pulls/174
2022-10-31 17:54:56 +00:00
moeidheidari
181a225eff dockerfile-envs fixe, three bugs in select.tsx,typography/Link.tsx, and typography/RouterLink.tsx fixed 2022-10-31 20:50:33 +03:00
49 changed files with 4054 additions and 4219 deletions

View File

@ -1,5 +1,5 @@
.env* .env*
!.env.production .env.production
node_modules node_modules
build build
.vscode .vscode

6
.env Normal file
View File

@ -0,0 +1,6 @@
REACT_APP_CMS_BASE_URL=http://api.scipaper.ru
REACT_APP_CMS_APP_NAME=scipaper
REACT_APP_OPENID_PROVIDER_URL=http://auth.techpal.ru/auth/realms/master/protocol/openid-connect/auth?client_id=techpal&response_type=code
REACT_APP_INTEGRATOR_URL=http://api.scipaper.ru
REACT_APP_INTEGRATOR_API_VERSION=/v1
REACT_APP_GRAPHQL_URL=/graphql

View File

@ -1,6 +1,6 @@
REACT_APP_CMS_BASE_URL=http://scipaper.ru REACT_APP_CMS_BASE_URL=http://api.scipaper.ru
REACT_APP_CMS_APP_NAME=scipaper REACT_APP_CMS_APP_NAME=scipaper
REACT_APP_OPENID_PROVIDER_URL=http://auth.techpal.ru/auth/realms/master/protocol/openid-connect/auth?client_id=techpal&response_type=code REACT_APP_OPENID_PROVIDER_URL=http://auth.techpal.ru/auth/realms/master/protocol/openid-connect/auth?client_id=techpal&response_type=code
REACT_APP_INTEGRATOR_URL=http://scipaper.ru REACT_APP_INTEGRATOR_URL=http://api.scipaper.ru
REACT_APP_INTEGRATOR_API_VERSION=/v1 REACT_APP_INTEGRATOR_API_VERSION=/v1
REACT_APP_GRAPHQL_URL=/graphql REACT_APP_GRAPHQL_URL=/graphql

View File

@ -1,6 +1,6 @@
REACT_APP_CMS_BASE_URL=http://scipaper.ru REACT_APP_CMS_BASE_URL=http://api.scipaper.ru
REACT_APP_CMS_APP_NAME=scipaper REACT_APP_CMS_APP_NAME=scipaper
REACT_APP_OPENID_PROVIDER_URL=http://auth.techpal.ru/auth/realms/master/protocol/openid-connect/auth?client_id=techpal&response_type=code REACT_APP_OPENID_PROVIDER_URL=http://auth.techpal.ru/auth/realms/master/protocol/openid-connect/auth?client_id=techpal&response_type=code
REACT_APP_INTEGRATOR_URL=http://scipaper.ru REACT_APP_INTEGRATOR_URL=http://api.scipaper.ru
REACT_APP_INTEGRATOR_API_VERSION=/v1 REACT_APP_INTEGRATOR_API_VERSION=/v1
REACT_APP_GRAPHQL_URL=/graphql REACT_APP_GRAPHQL_URL=/graphql

View File

@ -1,41 +1,30 @@
# Install dependencies only when needed # Install dependencies only when needed
FROM node:16-alpine AS deps FROM node:fermium-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat RUN apk add --no-cache libc6-compat
WORKDIR /app WORKDIR /home/app/
COPY package.json package-lock.json ./ COPY package.json package-lock.json ./
RUN npm ci RUN npm ci
# Rebuild the source code only when needed
FROM node:16-alpine AS builder
ENV NODE_ENV production
WORKDIR /app
# Copy dependencies from deps stage
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build
# Bundle static assets with nginx # Bundle static assets with nginx
FROM node:16-alpine as production FROM node:fermium-alpine as production
# Copy built assets from builder # Copy built assets from builder
WORKDIR /app WORKDIR /home/app/
COPY --from=builder /app/build . COPY --from=deps ./home/app/node_modules ./node_modules
COPY . .
# Expose ports # Expose ports
EXPOSE 3000 EXPOSE 3000
COPY .env.production .
ENV NODE_ENV production ENV NODE_ENV production
ENV USER_NAME=node_user USER_UID=2000 GROUP_NAME=node_group GROUP_UID=2000 ENV USER_NAME=node_user USER_UID=2000 GROUP_NAME=node_group GROUP_UID=2000
RUN npm i -g serve \ RUN deluser --remove-home node \
&& deluser --remove-home node \
&& addgroup --g ${GROUP_UID} -S ${GROUP_NAME} \ && addgroup --g ${GROUP_UID} -S ${GROUP_NAME} \
&& adduser -D -S -s /sbin/nologin -u ${USER_UID} -G ${GROUP_NAME} ${USER_NAME}\ && adduser -D -S -s /sbin/nologin -u ${USER_UID} -G ${GROUP_NAME} ${USER_NAME}
&& chown -R ${USER_NAME}:${GROUP_NAME} "/app/"
USER "${USER_NAME}" USER "${USER_NAME}"
CMD serve -s .
ENTRYPOINT [ "npm","start"]

8057
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@
"@fortawesome/free-brands-svg-icons": "^6.2.0", "@fortawesome/free-brands-svg-icons": "^6.2.0",
"@fortawesome/free-solid-svg-icons": "^6.2.0", "@fortawesome/free-solid-svg-icons": "^6.2.0",
"@fortawesome/react-fontawesome": "^0.2.0", "@fortawesome/react-fontawesome": "^0.2.0",
"@headlessui/react": "^1.6.6", "@headlessui/react": "^1.7.3",
"@reduxjs/toolkit": "^1.8.3", "@reduxjs/toolkit": "^1.8.3",
"@types/node": "^16.11.47", "@types/node": "^16.11.47",
"@types/react": "^18.0.15", "@types/react": "^18.0.15",
@ -24,9 +24,9 @@
"i18next-http-backend": "^1.4.1", "i18next-http-backend": "^1.4.1",
"jwt-decode": "^3.1.2", "jwt-decode": "^3.1.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"react": "^18.2.0", "react": "^18.1.0",
"react-copy-to-clipboard": "^5.1.0", "react-copy-to-clipboard": "^5.1.0",
"react-dom": "^18.2.0", "react-dom": "^18.1.0",
"react-hotkeys": "^2.0.0", "react-hotkeys": "^2.0.0",
"react-i18next": "^11.18.3", "react-i18next": "^11.18.3",
"react-loading-skeleton": "^3.1.0", "react-loading-skeleton": "^3.1.0",

38
src/article/controller/articleViewModel.ts Normal file → Executable file
View File

@ -1,18 +1,40 @@
import type { ArticleStore } from "../domain/articleStore"; import type { ArticleStore } from "../domain/articleStore";
import { getArticleUseCase } from "../useCases/getArticleUseCase";
import { useCallback, useEffect } from "react"; import { useCallback, useEffect } from "react";
import { getArticle } from "article/data/articleAPIService";
import { Article } from "article/domain/articleEntity";
function useArticleViewModel(
store: ArticleStore,
fetchArticleUseCase: (
fetchArticleCallback: (id: string) => Promise<Article | null>,
setArticle: ArticleStore["setArticle"],
id: string,
) => Promise<Article | null>,
getArticleUseCase: (
getArticle: ArticleStore["getArticle"],
setArticle: ArticleStore["setArticle"],
id: Article["id"],
) => Promise<Article | null>,
id: string,
) {
let article: Article | null | undefined;
function useArticleViewModel(store: ArticleStore) {
const _getArticle = useCallback( const _getArticle = useCallback(
(id: string) => getArticleUseCase(store.getArticle, store.setArticle, id), (id: string) => {
[store.getArticle, store.setArticle] getArticleUseCase(store.getArticle, store.setArticle, id).then(async (value) => {
if (value == null) {
article = await fetchArticleUseCase(getArticle, store.setArticle, id);
return;
}
article = value;
});
},
[store.setArticle]
); );
useEffect(() => { useEffect(() => {
if (store.article != undefined) { _getArticle(id);
_getArticle(store.article.id); }, [article]);
}
}, [store.article?.id]);
return { return {
article: store.article, article: store.article,

0
src/article/data/articleAPIService.ts Normal file → Executable file
View File

0
src/article/data/articleActionTypes.ts Normal file → Executable file
View File

1
src/article/data/articleActions.ts Normal file → Executable file
View File

@ -7,7 +7,6 @@ const setArticleAction = (article: Article) => (dispatch: any) =>
dispatch({ type: actionTypes.SET_ARTICLE, article }); dispatch({ type: actionTypes.SET_ARTICLE, article });
const getArticleAction = (id: string) => (dispatch: any) => { const getArticleAction = (id: string) => (dispatch: any) => {
dispatch({ type: actionTypes.GET_ARTICLE });
return getArticleAPI(id) return getArticleAPI(id)
.then((article) => { .then((article) => {

0
src/article/data/articleCommonStateStore.ts Normal file → Executable file
View File

0
src/article/data/articleReducer.ts Normal file → Executable file
View File

0
src/article/data/articleStoreImplementation.ts Normal file → Executable file
View File

0
src/article/data/dto/fetch_article_by_id_dto.ts Normal file → Executable file
View File

0
src/article/domain/articleEntity.ts Normal file → Executable file
View File

0
src/article/domain/articleModel.ts Normal file → Executable file
View File

0
src/article/domain/articleStore.ts Normal file → Executable file
View File

View File

@ -0,0 +1,16 @@
import { Article } from "article/domain/articleEntity";
import { ArticleStore } from "article/domain/articleStore";
const fetchArticleUseCase = async (
fetchArticleCallback: (id: string) => Promise<Article | null>,
setArticle: ArticleStore["setArticle"],
id: string,
): Promise<Article | null> => {
const article = await fetchArticleCallback(id);
if (article) {
await setArticle(article);
}
return article;
};
export { fetchArticleUseCase };

0
src/article/useCases/getArticleUseCase.ts Normal file → Executable file
View File

0
src/article/useCases/params/create_article_params.ts Normal file → Executable file
View File

0
src/assets/lotties/notFoundAnimation.json Normal file → Executable file
View File

12
src/components/ArticleSearchResult.tsx Normal file → Executable file
View File

@ -27,17 +27,15 @@ export const ArticleSearchResult = ({ searchItem }: Props) => {
<Article className=" pt-6 pb-3 "> <Article className=" pt-6 pb-3 ">
<div className="flex flex-row justify-between"> <div className="flex flex-row justify-between">
<Article.Breadcumbs emphasis="low" className="flex flex-wrap flex-row"> <Article.Breadcumbs emphasis="low" className="flex flex-wrap flex-row">
{[ {[`${searchItem.topic}`]}
`${searchItem.topic}`,
`${searchItem.topic}`,
`${searchItem.topic}`,
`${searchItem.topic}`,
]}
</Article.Breadcumbs> </Article.Breadcumbs>
<Article.SubscriptionsButtons /> <Article.SubscriptionsButtons />
</div> </div>
<Article.Title linkTo={`/article/info/${searchItem.id}`} className="text-2xl"> <Article.Title
linkTo={`/article/info/${searchItem.id}`}
className="text-2xl"
>
{searchItem.title} {searchItem.title}
</Article.Title> </Article.Title>
<Article.Authors emphasis="low" className="flex flex-wrap flex-row"> <Article.Authors emphasis="low" className="flex flex-wrap flex-row">

26
src/components/Burger.tsx Normal file → Executable file
View File

@ -21,10 +21,12 @@ import { ReactComponent as SVGFile } from "assets/svg/file.svg";
import { ReactComponent as SVGEye } from "assets/svg/eye.svg"; import { ReactComponent as SVGEye } from "assets/svg/eye.svg";
import { ReactComponent as SVGArrowUp } from "assets/svg/arrow-up.svg"; import { ReactComponent as SVGArrowUp } from "assets/svg/arrow-up.svg";
import { ReactComponent as SVGCaretDown } from "assets/svg/caret-down.svg"; import { ReactComponent as SVGCaretDown } from "assets/svg/caret-down.svg";
import { useTranslation } from "react-i18next";
type Props = React.ComponentPropsWithoutRef<"div">; type Props = React.ComponentPropsWithoutRef<"div">;
const Burger = (props: Props) => { const Burger = (props: Props) => {
const { t, i18n } = useTranslation();
return ( return (
<div {...props}> <div {...props}>
<Menu as="div" className="relative inline-block text-left z-30"> <Menu as="div" className="relative inline-block text-left z-30">
@ -46,13 +48,15 @@ const Burger = (props: Props) => {
leaveTo="transform opacity-0 scale-95" leaveTo="transform opacity-0 scale-95"
> >
<Menu.Items <Menu.Items
className="origin-top-right absolute right-0 mt-5 w-44 rounded-md className="origin-top-right absolute right-0 mt-5 w-48 rounded-md
shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"
> >
<div className="py-1"> <div className="py-1">
<Disclosure> <Disclosure>
<Disclosure.Button className="uppercase text-base px-2 py-1"> <Disclosure.Button className="uppercase text-base px-2 py-1">
<Link className="text-[#096DD9]">create new</Link> <Link className="text-[#096DD9]">
{t("navbar.createNew")}
</Link>
</Disclosure.Button> </Disclosure.Button>
</Disclosure> </Disclosure>
<hr /> <hr />
@ -66,7 +70,7 @@ const Burger = (props: Props) => {
text-base text-base
" "
> >
my library <span>{t("navbar.library.navTitle")}</span>
<SVGArrowUp <SVGArrowUp
className={`${ className={`${
open ? "rotate-180 transform" : "rotate-360" open ? "rotate-180 transform" : "rotate-360"
@ -83,7 +87,7 @@ const Burger = (props: Props) => {
" "
> >
<SVGFile className="stroke-black w-4 h-4" /> <SVGFile className="stroke-black w-4 h-4" />
My Publications <span>{t("navbar.library.publications")}</span>
</Disclosure.Panel> </Disclosure.Panel>
</Link> </Link>
@ -96,7 +100,7 @@ const Burger = (props: Props) => {
" "
> >
<SVGFavoriteOutlined className="stroke-black w-4 h-4" /> <SVGFavoriteOutlined className="stroke-black w-4 h-4" />
My Favorites <span>{t("navbar.library.favorites")}</span>
</Disclosure.Panel> </Disclosure.Panel>
</Link> </Link>
@ -109,7 +113,7 @@ const Burger = (props: Props) => {
" "
> >
<SVGFolder className="stroke-black fill-black w-4 h-4" /> <SVGFolder className="stroke-black fill-black w-4 h-4" />
My Collections <span>{t("navbar.library.collections")}</span>
</Disclosure.Panel> </Disclosure.Panel>
</Link> </Link>
@ -122,7 +126,7 @@ const Burger = (props: Props) => {
" "
> >
<SVGEye className="stroke-black w-4 h-4" /> <SVGEye className="stroke-black w-4 h-4" />
Recent Viewed <span>{t("navbar.library.recentViewed")}</span>
</Disclosure.Panel> </Disclosure.Panel>
</Link> </Link>
</> </>
@ -140,7 +144,7 @@ const Burger = (props: Props) => {
text-base text-base
" "
> >
About <span>{t("navbar.about.navTitle")}</span>
<SVGArrowUp <SVGArrowUp
className={`${ className={`${
open ? "rotate-180 transform" : "rotate-360" open ? "rotate-180 transform" : "rotate-360"
@ -156,7 +160,7 @@ const Burger = (props: Props) => {
text-base text-base
" "
> >
About Freeland <span>{t("navbar.about.aboutProject")}</span>
</Disclosure.Panel> </Disclosure.Panel>
</Link> </Link>
@ -168,7 +172,7 @@ const Burger = (props: Props) => {
text-base text-base
" "
> >
Contact Us <span>{t("navbar.about.contacts")}</span>
</Disclosure.Panel> </Disclosure.Panel>
</Link> </Link>
@ -180,7 +184,7 @@ const Burger = (props: Props) => {
text-base text-base
" "
> >
Help <span>{t("navbar.about.help")}</span>
</Disclosure.Panel> </Disclosure.Panel>
</Link> </Link>
</> </>

0
src/components/Disclosure.tsx Normal file → Executable file
View File

0
src/components/Filters/AppiledFilters.tsx Normal file → Executable file
View File

0
src/components/Filters/Filter.tsx Normal file → Executable file
View File

0
src/components/Filters/IProdutct.ts Normal file → Executable file
View File

0
src/components/Filters/SearchFilterBar.tsx Normal file → Executable file
View File

0
src/components/Filters/functions/debounce.ts Normal file → Executable file
View File

0
src/components/Loader/Loader.css Normal file → Executable file
View File

0
src/components/Loader/Loader.tsx Normal file → Executable file
View File

0
src/components/LocalizationButton.tsx Normal file → Executable file
View File

5
src/components/Markdown.tsx Normal file → Executable file
View File

@ -14,9 +14,8 @@ import Heading from "./typography/Heading";
/* Code */ /* Code */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { dark } from "react-syntax-highlighter/dist/esm/styles/prism"; import { oneLight } from "react-syntax-highlighter/dist/esm/styles/prism";
import Link from "./typography/Link"; import Link from "./typography/Link";
import style from "react-syntax-highlighter/dist/esm/styles/hljs/a11y-dark";
export type Props = { export type Props = {
markdown: string; markdown: string;
@ -153,7 +152,7 @@ const Markdown = ({ markdown }: Props) => {
return !inline && match ? ( return !inline && match ? (
<SyntaxHighlighter <SyntaxHighlighter
children={String(children).replace(/\n$/, "")} children={String(children).replace(/\n$/, "")}
style={dark} style={oneLight}
language={match[1]} language={match[1]}
PreTag="div" PreTag="div"
/> />

0
src/components/SearchResultsSection.tsx Normal file → Executable file
View File

0
src/components/SearchSection.tsx Normal file → Executable file
View File

View File

@ -83,7 +83,7 @@ function Select<T>({
}: Props<T>): JSX.Element { }: Props<T>): JSX.Element {
return ( return (
<div className={classNames("top-16 w-60", className)}> <div className={classNames("top-16 w-60", className)}>
<Listbox value={value} {...props} onChange={onChange}> <Listbox value={value as any } {...props} onChange={onChange}>
<div className="relative"> <div className="relative">
<Listbox.Button <Listbox.Button
className={classNames([ className={classNames([

20
src/components/fetchAnArticle/AnArticle.tsx Normal file → Executable file
View File

@ -10,18 +10,26 @@ import { SVGSearch } from "components/icons";
import BaseLayout from "components/BaseLayout"; import BaseLayout from "components/BaseLayout";
import Typography from "components/typography/Typography"; import Typography from "components/typography/Typography";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { fetchArticleUseCase } from "article/useCases/fetchArticleUseCase";
import { getArticleUseCase } from "article/useCases/getArticleUseCase";
const AnArticle = () => { const AnArticle = () => {
const store = useArticleStore(); const store = useArticleStore();
const { article, hasError, shouldShowLoading } = useArticleViewModel(store); const { id } = useParams();
const { article, hasError, shouldShowLoading } = useArticleViewModel(
store,
fetchArticleUseCase,
getArticleUseCase,
id ?? '',
);
const { i18n, t } = useTranslation(); const { i18n, t } = useTranslation();
const { id } = useParams(); // const { id } = useParams();
const newId = `${id}`; // const newId = `${id}`;
useEffect(() => { // useEffect(() => {
store.getArticle(newId); // store.getArticle(newId);
}, [id]); // }, [id]);
if (hasError) { if (hasError) {
return <NotFound />; return <NotFound />;

16
src/components/fetchAnArticle/AnArticleBody.tsx Normal file → Executable file
View File

@ -13,15 +13,21 @@ import BaseLayout from "components/BaseLayout";
import Container from "components/Container"; import Container from "components/Container";
import NotFound from "./NotFound"; import NotFound from "./NotFound";
import Markdown from "components/Markdown"; import Markdown from "components/Markdown";
import { fetchArticleUseCase } from "article/useCases/fetchArticleUseCase";
import { getArticleUseCase } from "article/useCases/getArticleUseCase";
const AnArticleBody = () => { const AnArticleBody = () => {
const store = useArticleStore(); const store = useArticleStore();
const { article, hasError, shouldShowLoading } = useArticleViewModel(store);
const { id } = useParams(); const { id } = useParams();
const newId = `${id}`; const { article, hasError, shouldShowLoading } = useArticleViewModel(
useEffect(() => { store,
store.getArticle(newId); fetchArticleUseCase,
}, [id]); getArticleUseCase,
id ?? '',
);
// useEffect(() => {
// store.getArticle(newId);
// }, [id]);
if (hasError) <NotFound />; if (hasError) <NotFound />;
return ( return (
<BaseLayout> <BaseLayout>

0
src/components/fetchAnArticle/AskeletonArticle.tsx Normal file → Executable file
View File

0
src/components/fetchAnArticle/NotFound.tsx Normal file → Executable file
View File

View File

@ -80,7 +80,7 @@ const Header = () => {
<ContextMenu <ContextMenu
emphasis="high" emphasis="high"
button={t("navbar.library.navTitle")} button={t("navbar.library.navTitle")}
className="border-none uppercase" className="border-none uppercase z-40"
> >
<ContextMenuAction <ContextMenuAction
caption={t("navbar.library.publications")} caption={t("navbar.library.publications")}
@ -112,7 +112,7 @@ const Header = () => {
<ContextMenu <ContextMenu
emphasis="high" emphasis="high"
button={t("navbar.about.navTitle")} button={t("navbar.about.navTitle")}
className="border-none uppercase" className="border-none uppercase z-40"
> >
<ContextMenuAction <ContextMenuAction
caption={t("navbar.about.aboutProject")} caption={t("navbar.about.aboutProject")}

0
src/components/search/SearchBar.tsx Normal file → Executable file
View File

View File

@ -47,6 +47,7 @@ export default function Link({
typeof style === "function" typeof style === "function"
? style({ ? style({
isActive: true, isActive: true,
isPending: false
}) })
: style : style
} }

View File

@ -15,7 +15,7 @@ export function RouterLink({
return ( return (
<NavLink <NavLink
to={to} to={to}
className={classNames({ "pointer-events-none": disabled }, className)} className={classNames({ "pointer-events-none": disabled }, className as string)}
> >
{children} {children}
</NavLink> </NavLink>

View File

@ -25,7 +25,6 @@ if (!rootElement) throw new Error("Failed to find the root element");
const root = ReactDOM.createRoot(rootElement); const root = ReactDOM.createRoot(rootElement);
root.render( root.render(
<Provider store={store}> <Provider store={store}>
<React.StrictMode>
<BrowserRouter> <BrowserRouter>
<Routes> <Routes>
<Route path="/" element={<App />} /> <Route path="/" element={<App />} />
@ -46,7 +45,6 @@ root.render(
<Route path="/*" element={<NotFound />}></Route> <Route path="/*" element={<NotFound />}></Route>
</Routes> </Routes>
</BrowserRouter> </BrowserRouter>
</React.StrictMode>
</Provider> </Provider>
); );

0
src/pages/SearchResultsPage.tsx Normal file → Executable file
View File