Merge branch 'main' of https://github.com/VividTruthKeeper/hhm-client
This commit is contained in:
commit
9650b5b157
|
|
@ -12,6 +12,7 @@
|
|||
"@types/react-calendar": "^3.9.0",
|
||||
"@types/react-lazy-load-image-component": "^1.5.2",
|
||||
"@types/react-redux": "^7.1.25",
|
||||
"@types/react-transition-group": "^4.4.5",
|
||||
"@types/uuid": "^9.0.0",
|
||||
"axios": "^1.2.3",
|
||||
"framer-motion": "^8.5.0",
|
||||
|
|
@ -23,6 +24,7 @@
|
|||
"react-redux": "^8.0.5",
|
||||
"react-router-dom": "^6.7.0",
|
||||
"react-spinners": "^0.13.8",
|
||||
"react-transition-group": "^4.4.5",
|
||||
"redux-thunk": "^2.4.2",
|
||||
"sass": "^1.57.1",
|
||||
"swiper": "^9.0.3",
|
||||
|
|
@ -1149,6 +1151,14 @@
|
|||
"redux": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/react-transition-group": {
|
||||
"version": "4.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.5.tgz",
|
||||
"integrity": "sha512-juKD/eiSM3/xZYzjuzH6ZwpP+/lejltmiS3QEzV/vmb/Q8+HfDmxu+Baga8UEMGBqV88Nbg4l2hY/K2DkyaLLA==",
|
||||
"dependencies": {
|
||||
"@types/react": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/scheduler": {
|
||||
"version": "0.16.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz",
|
||||
|
|
@ -1437,6 +1447,15 @@
|
|||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/dom-helpers": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz",
|
||||
"integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.8.7",
|
||||
"csstype": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.284",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz",
|
||||
|
|
@ -2163,6 +2182,21 @@
|
|||
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-transition-group": {
|
||||
"version": "4.4.5",
|
||||
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz",
|
||||
"integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"dom-helpers": "^5.0.1",
|
||||
"loose-envify": "^1.4.0",
|
||||
"prop-types": "^15.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=16.6.0",
|
||||
"react-dom": ">=16.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
"@types/react-calendar": "^3.9.0",
|
||||
"@types/react-lazy-load-image-component": "^1.5.2",
|
||||
"@types/react-redux": "^7.1.25",
|
||||
"@types/react-transition-group": "^4.4.5",
|
||||
"@types/uuid": "^9.0.0",
|
||||
"axios": "^1.2.3",
|
||||
"framer-motion": "^8.5.0",
|
||||
|
|
@ -24,6 +25,7 @@
|
|||
"react-redux": "^8.0.5",
|
||||
"react-router-dom": "^6.7.0",
|
||||
"react-spinners": "^0.13.8",
|
||||
"react-transition-group": "^4.4.5",
|
||||
"redux-thunk": "^2.4.2",
|
||||
"sass": "^1.57.1",
|
||||
"swiper": "^9.0.3",
|
||||
|
|
|
|||
24
src/App.tsx
24
src/App.tsx
|
|
@ -1,22 +1,22 @@
|
|||
// Modules
|
||||
import { Routes, Route } from 'react-router-dom';
|
||||
import { Routes, Route } from "react-router-dom";
|
||||
|
||||
// Styles
|
||||
import 'swiper/swiper.css';
|
||||
import 'swiper/css/pagination';
|
||||
import 'swiper/css/navigation';
|
||||
import 'react-lazy-load-image-component/src/effects/blur.css';
|
||||
import 'react-calendar/dist/Calendar.css';
|
||||
import './styles/style.scss';
|
||||
import "swiper/swiper.css";
|
||||
import "swiper/css/pagination";
|
||||
import "swiper/css/navigation";
|
||||
import "react-lazy-load-image-component/src/effects/blur.css";
|
||||
import "react-calendar/dist/Calendar.css";
|
||||
import "./styles/style.scss";
|
||||
|
||||
// Pages
|
||||
import Main from './pages/Main';
|
||||
import NewsArticle from './pages/NewsArticle';
|
||||
import Category from './pages/Category';
|
||||
import Main from "./pages/Main";
|
||||
import NewsArticle from "./pages/NewsArticle";
|
||||
import Category from "./pages/Category";
|
||||
|
||||
// Components
|
||||
import Header from './components/header/Header';
|
||||
import Footer from './components/footer/Footer';
|
||||
import Header from "./components/header/Header";
|
||||
import Footer from "./components/footer/Footer";
|
||||
|
||||
const App = () => {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// Modules
|
||||
import { Link } from "react-router-dom";
|
||||
import { Link, useLocation } from "react-router-dom";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import { motion } from "framer-motion";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
|
@ -45,6 +45,13 @@ const SubNav = () => {
|
|||
api.get(data, setData);
|
||||
}, [language]);
|
||||
|
||||
const location = useLocation();
|
||||
useEffect(() => {
|
||||
if (!location.pathname.includes("category")) return;
|
||||
const category = location.pathname[location.pathname.length - 1];
|
||||
onClickLink(parseInt(category));
|
||||
}, [location]);
|
||||
|
||||
return (
|
||||
<nav className="subnav">
|
||||
<div className="container">
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
// Components
|
||||
import Aside from '../components/aside/Aside';
|
||||
import NewsScroll from '../components/global/NewsScroll';
|
||||
import Videos from '../components/videos/Videos';
|
||||
import MainContent from '../components/main/MainContent';
|
||||
import Aside from "../components/aside/Aside";
|
||||
import NewsScroll from "../components/global/NewsScroll";
|
||||
import Videos from "../components/videos/Videos";
|
||||
import MainContent from "../components/main/MainContent";
|
||||
|
||||
const Main = () => {
|
||||
return (
|
||||
<main className="main">
|
||||
<h1 style={{ display: "none" }}>Туркменистан новостной портал</h1>
|
||||
<div className="news-section">
|
||||
<div className="container">
|
||||
<div className="news-inner">
|
||||
|
|
|
|||
Loading…
Reference in New Issue