diff --git a/.env.example b/.env.example index 3edacf3..183c768 100644 --- a/.env.example +++ b/.env.example @@ -1,11 +1,16 @@ +PORT= REACT_APP_SITENAME= REACT_APP_SITEURL= REACT_APP_INDEX_TITLE_TEXT= -REACT_APP_DISQUS_SHORTNAME= REACT_APP_HEADER_LOGO_TYPE= +REACT_APP_DISQUS_SHORTNAME= REACT_APP_DEV_API_URL= +REACT_APP_DEV_ADMIN_URL= +REACT_APP_JIKAN_INSTANCE_URL= REACT_APP_GA_USER_ID= REACT_APP_SSS_PAGE= +REACT_APP_USE_SERVICE_WORKER= +REACT_APP_DEFAULT_LANG= REACT_APP_META_DESCRIPTION= REACT_APP_META_AUTHOR= diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..2d2e9a0 --- /dev/null +++ b/.env.production @@ -0,0 +1 @@ +INLINE_RUNTIME_CHUNK=false \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3de2007..5090264 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,5 @@ src/static/fullLogo.gif /src/static/logo.png /src/static/fullLogo.png /src/static/fullLogo-dark.png + +.eslintcache diff --git a/README.md b/README.md index e2b501c..85aab14 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@
-[React](https://github.com/facebook/react), [ReactN](https://github.com/CharlesStover/reactn) ve [Material-UI](https://github.com/mui-org/material-ui) kullanarak hazırlandı. +[React](https://github.com/facebook/react) ve [Material-UI](https://github.com/mui-org/material-ui) kullanarak hazırlandı. ## Yükleme Talimatları diff --git a/package.json b/package.json index 1d6c21e..c8115f6 100644 --- a/package.json +++ b/package.json @@ -1,73 +1,76 @@ { "name": "forfansubsfront", - "version": "3.2.1", - "private": false, - "dependencies": { - "@fortawesome/fontawesome-svg-core": "^1.2.28", - "@fortawesome/free-brands-svg-icons": "^5.13.0", - "@fortawesome/free-regular-svg-icons": "^5.13.0", - "@fortawesome/free-solid-svg-icons": "^5.13.0", - "@fortawesome/react-fontawesome": "^0.1.10", - "@material-ui/core": "^4.10.1", - "@material-ui/icons": "^4.9.1", - "@material-ui/lab": "^4.0.0-alpha.55", - "awesome-debounce-promise": "^2.1.0", - "axios": "^0.21.1", - "core-js": "^3.6.5", - "cron": "^1.8.2", - "date-fns": "^2.14.0", - "disqus-react": "^1.0.8", - "lodash": "^4.17.19", - "lodash-es": "^4.17.15", - "markdown-to-jsx": "^6.11.4", - "node-sass": "^4.14.1", - "notistack": "^0.9.16", - "react": "^16.13.1", - "react-app-polyfill": "^1.0.6", - "react-async-hook": "^3.6.1", - "react-dom": "^16.13.1", - "react-dotdotdot": "^1.3.1", - "react-ga": "^2.7.0", - "react-helmet-async": "^1.0.6", - "react-infinite-scroll-component": "^5.0.5", - "react-interval": "^2.1.1", - "react-lazyload": "^2.6.7", - "react-parallax": "^3.0.3", - "react-router-dom": "^5.2.0", - "react-scripts": "3.4.1", - "react-swipeable": "^5.5.1", - "react-toastify": "^6.0.5", - "reactn": "^2.2.7", - "reactn-devtools": "^1.1.0", - "redux": "^4.0.5", - "rellax": "^1.12.1", - "remarkable": "^2.0.1", - "source-map-explorer": "^2.4.2" - }, - "resolutions": { - "minimist": "^1.2.3" - }, - "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", - "eject": "react-scripts eject", - "analyze": "source-map-explorer build/static/js/*" - }, - "eslintConfig": { - "extends": "react-app" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "proxy": "http://localhost:5000" + "version": "4.0.0", + "private": false, + "dependencies": { + "@fortawesome/fontawesome-svg-core": "^1.2.32", + "@fortawesome/free-brands-svg-icons": "^5.15.1", + "@fortawesome/free-regular-svg-icons": "^5.15.1", + "@fortawesome/free-solid-svg-icons": "^5.15.1", + "@fortawesome/react-fontawesome": "^0.1.13", + "@material-ui/core": "^4.11.1", + "@material-ui/icons": "^4.9.1", + "@material-ui/lab": "^4.0.0-alpha.56", + "@nivo/bar": "^0.65.1", + "@nivo/core": "^0.66.0", + "awesome-debounce-promise": "^2.1.0", + "axios": "^0.21.0", + "core-js": "^3.7.0", + "date-fns": "^2.16.1", + "disqus-react": "^1.0.10", + "flag-icon-css": "^3.5.0", + "i18next": "^19.8.4", + "i18next-browser-languagedetector": "^6.0.1", + "i18next-http-backend": "^1.0.21", + "lodash-es": "^4.17.15", + "markdown-to-jsx": "^7.1.0", + "notistack": "^1.0.2", + "react": "^17.0.1", + "react-app-polyfill": "^2.0.0", + "react-device-detect": "^1.17.0", + "react-dom": "^17.0.1", + "react-dotdotdot": "^1.3.1", + "react-ga": "^3.3.0", + "react-helmet-async": "^1.0.7", + "react-i18next": "^11.7.3", + "react-icons": "^4.1.0", + "react-infinite-scroll-component": "^5.1.0", + "react-interval": "^2.1.1", + "react-lazyload": "^3.1.0", + "react-router-dom": "^5.2.0", + "react-scripts": "4.0.1", + "react-swipeable": "^6.0.0", + "sass": "^1.32.8", + "web-vitals": "^1.0.1" + }, + "resolutions": { + "minimist": "^1.2.3" + }, + "devDependencies": { + "source-map-explorer": "^2.5.0" + }, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject", + "analyze": "source-map-explorer build/static/js/*" + }, + "eslintConfig": { + "extends": "react-app" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version", + "not dead" + ] + }, + "proxy": "http://localhost:5000" } \ No newline at end of file diff --git a/src/App.js b/src/App.js index c857592..9c146a4 100644 --- a/src/App.js +++ b/src/App.js @@ -1,5 +1,4 @@ -import React, { useEffect, lazy, Suspense } from 'react'; -import { useDispatch, useGlobal } from 'reactn' +import React, { useEffect, lazy, Suspense, useContext } from 'react'; import { BrowserRouter as Router, Route, Switch } from "react-router-dom"; import { HelmetProvider } from 'react-helmet-async' import Wrapper from './components/hoc/wrapper' @@ -12,6 +11,9 @@ import SSSPage from './pages/sss/index' import FourOhFourPage from './components/404/404' import EkipAlimlariPage from './pages/ekip-alimlari/index' import ExtraPagesList from './pages/extra-pages/index' +import SiteStatusContext from './contexts/site_status.context'; +import LoginPage from './pages/user/logIn' +import RegisterPage from './pages/user/register' const IndexPage = lazy(() => import('./pages/index/index')) const SearchPage = lazy(() => import('./pages/ara/index')) @@ -20,48 +22,50 @@ const MangaPage = lazy(() => import('./pages/ceviriler/manga/index')) const EpisodePage = lazy(() => import('./pages/episode/index')) const MangaEpisodePage = lazy(() => import('./pages/manga-episode/index')) const CompleteRegistrationPage = lazy(() => import('./pages/kayit-tamamla/index')) +const TakvimPage = lazy(() => import('./pages/calendar/index')) export default function App() { - const getOnline = useDispatch('getOnline') - const checkMobile = useDispatch('checkMobile') - const [online] = useGlobal('online') + const [siteStatus] = useContext(SiteStatusContext) + ReactGA.initialize(process.env.REACT_APP_GA_USER_ID); useEffect(() => { - getOnline() - checkMobile(navigator.userAgent || navigator.vendor || window.opera) - - }, [getOnline, checkMobile]) + }, []) - if (online === true) + if (siteStatus.status === true) return ( <>