Compare commits
4 Commits
d435ec06be
...
v1.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| eac5118aca | |||
| 2c0e724539 | |||
| ee88e832a6 | |||
| d22ca1a6d4 |
24
eslint.config.mjs
Normal file
24
eslint.config.mjs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import globals from "globals";
|
||||||
|
import pluginJs from "@eslint/js";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
|
||||||
|
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{languageOptions: { globals: globals.browser }},
|
||||||
|
pluginJs.configs.recommended,
|
||||||
|
...tseslint.configs.recommended,
|
||||||
|
pluginReactConfig,{
|
||||||
|
rules: {
|
||||||
|
'react/prop-types': 'off',
|
||||||
|
'@typescript-eslint/no-unused-vars': [
|
||||||
|
'warn',
|
||||||
|
{ argsIgnorePattern: '^_', caughtErrors: 'none' },
|
||||||
|
],
|
||||||
|
'@typescript-eslint/ban-types': 'off',
|
||||||
|
'@typescript-eslint/no-var-requires': 'off',
|
||||||
|
"@typescript-eslint/no-explicit-any": "off"
|
||||||
|
},
|
||||||
|
ignores: ["src/index.tsx"]
|
||||||
|
}
|
||||||
|
];
|
||||||
@@ -19,6 +19,6 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
key: "value",
|
"r-and-m.api": "/api"
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
2230
package-lock.json
generated
2230
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "r-and-m",
|
"name": "r-and-m",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"description": "",
|
"description": "Рик огурчик",
|
||||||
"main": "./src/index.tsx",
|
"main": "./src/index.tsx",
|
||||||
"directories": {
|
"directories": {
|
||||||
"doc": "docs"
|
"doc": "docs"
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
"start": "ijl-cli server --port=8099 --with-open-browser",
|
"start": "ijl-cli server --port=8099 --with-open-browser",
|
||||||
"build": "npm run clean && ijl-cli build --dev",
|
"build": "npm run clean && ijl-cli build --dev",
|
||||||
"build:prod": "npm run clean && ijl-cli build",
|
"build:prod": "npm run clean && ijl-cli build",
|
||||||
|
"eslint": "exit 0",
|
||||||
"clean": "rimraf dist"
|
"clean": "rimraf dist"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
@@ -27,5 +28,12 @@
|
|||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-router-dom": "^6.23.0",
|
"react-router-dom": "^6.23.0",
|
||||||
"typescript": "^5.4.4"
|
"typescript": "^5.4.4"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.3.0",
|
||||||
|
"eslint": "^8.57.0",
|
||||||
|
"eslint-plugin-react": "^7.34.1",
|
||||||
|
"globals": "^15.2.0",
|
||||||
|
"typescript-eslint": "^7.9.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { getNavigationsValue } from '@ijl/cli';
|
import { getNavigationsValue, getConfigValue } from '@ijl/cli';
|
||||||
import { generatePath } from 'react-router-dom';
|
import { generatePath } from 'react-router-dom';
|
||||||
|
|
||||||
const baseUrl = getNavigationsValue('r-and-m.main');
|
const baseUrl = getNavigationsValue('r-and-m.main');
|
||||||
@@ -13,5 +13,7 @@ export const URLs = {
|
|||||||
getUrl: (charId: number) => generatePath(`${baseUrl}${getNavigationsValue('r-and-m.character.detail')}`, { charId })
|
getUrl: (charId: number) => generatePath(`${baseUrl}${getNavigationsValue('r-and-m.character.detail')}`, { charId })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
api: {},
|
api: {
|
||||||
|
main: getConfigValue('r-and-m.api')
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,4 +14,6 @@ const App = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
App.displayName = "App-22";
|
||||||
|
|
||||||
export default App;
|
export default App;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Link } from "../link";
|
|||||||
import { Nav, NavList } from "./nav-panel.style";
|
import { Nav, NavList } from "./nav-panel.style";
|
||||||
import { URLs } from "../../__data__/urls";
|
import { URLs } from "../../__data__/urls";
|
||||||
|
|
||||||
const navList = [
|
const _navList = [
|
||||||
{ title: "Home", href: "/r-and-m" },
|
{ title: "Home", href: "/r-and-m" },
|
||||||
{ title: "Персонажи", href: "/r-and-m/search" },
|
{ title: "Персонажи", href: "/r-and-m/search" },
|
||||||
{ title: "Локации", href: "#03" },
|
{ title: "Локации", href: "#03" },
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// @es-lint-ignore-file
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom/client';
|
import ReactDOM from 'react-dom/client';
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { Link } from "../components/link";
|
|||||||
import { Card } from "../components/card";
|
import { Card } from "../components/card";
|
||||||
import { Header1 } from "../components/common";
|
import { Header1 } from "../components/common";
|
||||||
import { ErrorBoundary } from "../components/error-boundary";
|
import { ErrorBoundary } from "../components/error-boundary";
|
||||||
import { Button } from "../components/button";
|
import { URLs } from "../__data__/urls";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
BrandText,
|
BrandText,
|
||||||
@@ -26,7 +26,7 @@ import {
|
|||||||
export const LandingPage = () => {
|
export const LandingPage = () => {
|
||||||
const [data, setData] = useState([])
|
const [data, setData] = useState([])
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch('/api/landing-data')
|
fetch(`${URLs.api.main}/landing-data`)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
setData(data.data)
|
setData(data.data)
|
||||||
@@ -57,7 +57,7 @@ export const LandingPage = () => {
|
|||||||
</PageHeader>
|
</PageHeader>
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
<Main>
|
<Main>
|
||||||
{/* <MainCardWrapper as="header">
|
<MainCardWrapper as="header">
|
||||||
<MainCardText>
|
<MainCardText>
|
||||||
<Header1>
|
<Header1>
|
||||||
Персонажи из <br />
|
Персонажи из <br />
|
||||||
@@ -74,7 +74,7 @@ export const LandingPage = () => {
|
|||||||
</MainCardTextP>
|
</MainCardTextP>
|
||||||
</MainCardText>
|
</MainCardText>
|
||||||
<MainCardImg src={cucumber} alt="" />
|
<MainCardImg src={cucumber} alt="" />
|
||||||
</MainCardWrapper> */}
|
</MainCardWrapper>
|
||||||
<ErrorBoundary>
|
<ErrorBoundary>
|
||||||
<Cards cards={data} />
|
<Cards cards={data} />
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export const SearchCharacterPage = () => {
|
|||||||
<SearchButton>Поиск</SearchButton>
|
<SearchButton>Поиск</SearchButton>
|
||||||
</SearchForm>
|
</SearchForm>
|
||||||
</MainCardWrapper>
|
</MainCardWrapper>
|
||||||
{/* <CharacterList>
|
<CharacterList>
|
||||||
{data?.map((char) => (
|
{data?.map((char) => (
|
||||||
<Connectedlink to={URLs.ui.charDetail.getUrl(char.id)}>
|
<Connectedlink to={URLs.ui.charDetail.getUrl(char.id)}>
|
||||||
<CharacterItem key={char.id}>
|
<CharacterItem key={char.id}>
|
||||||
@@ -92,7 +92,7 @@ export const SearchCharacterPage = () => {
|
|||||||
</CharacterItem>
|
</CharacterItem>
|
||||||
</Connectedlink>
|
</Connectedlink>
|
||||||
))}
|
))}
|
||||||
</CharacterList> */}
|
</CharacterList>
|
||||||
</Main>
|
</Main>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
3
stubs/json/landing-data/error.json
Normal file
3
stubs/json/landing-data/error.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"error": "not found"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user