update logo and fix routes
This commit is contained in:
parent
ce33d8a886
commit
2c89086299
|
@ -11,7 +11,25 @@
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="4b1db503-490b-4f06-812d-6b9b94d2764a" name="Default Changelist" comment="">
|
<list default="true" id="4b1db503-490b-4f06-812d-6b9b94d2764a" name="Default Changelist" comment="">
|
||||||
|
<change afterPath="$PROJECT_DIR$/public/logo.png" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/public/logo.svg" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/public/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/public/index.html" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/public/logo192.png" beforeDir="false" afterPath="$PROJECT_DIR$/public/logo192_2.png" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/App.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/App.js" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/components/elements/about.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/elements/about.jsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/components/elements/contacts.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/elements/contacts.jsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/components/elements/homepage/recent-block.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/elements/homepage/recent-block.jsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/components/elements/homepage/recent-list.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/elements/homepage/recent-list.jsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/components/pages/blog.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/pages/blog.jsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/components/pages/portfolio.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/pages/portfolio.jsx" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/constants/link-types.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/constants/link-types.js" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/constants/routes.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/constants/routes.js" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/index.js" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/reducers/client-reducer.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/reducers/client-reducer.js" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/reducers/site-content-reducer.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/reducers/site-content-reducer.js" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/serviceWorker.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/serviceWorker.js" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/store.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/store.js" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
@ -36,27 +54,28 @@
|
||||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
||||||
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
||||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||||
|
<property name="dart.analysis.tool.window.visible" value="false" />
|
||||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/public" />
|
<property name="last_opened_file_path" value="$PROJECT_DIR$/public" />
|
||||||
<property name="node.js.detected.package.eslint" value="true" />
|
<property name="node.js.detected.package.eslint" value="true" />
|
||||||
<property name="node.js.path.for.package.eslint" value="project" />
|
<property name="node.js.path.for.package.eslint" value="project" />
|
||||||
<property name="node.js.selected.package.eslint" value="(autodetect)" />
|
<property name="node.js.selected.package.eslint" value="(autodetect)" />
|
||||||
<property name="nodejs_package_manager_path" value="yarn" />
|
<property name="nodejs_package_manager_path" value="yarn" />
|
||||||
<property name="run.prettier.on.save" value="true" />
|
<property name="run.prettier.on.save" value="true" />
|
||||||
<property name="settings.editor.selected.configurable" value="project.propVCSSupport.Mappings" />
|
<property name="settings.editor.selected.configurable" value="reference.settingsdialog.IDE.editor.colors.Color Scheme Font" />
|
||||||
</component>
|
</component>
|
||||||
<component name="RecentsManager">
|
<component name="RecentsManager">
|
||||||
<key name="CopyFile.RECENT_KEYS">
|
|
||||||
<recent name="$PROJECT_DIR$/public" />
|
|
||||||
<recent name="$PROJECT_DIR$/src/reducers" />
|
|
||||||
<recent name="$PROJECT_DIR$/src/components/elements/homepage" />
|
|
||||||
<recent name="$PROJECT_DIR$/src/ascii" />
|
|
||||||
</key>
|
|
||||||
<key name="MoveFile.RECENT_KEYS">
|
<key name="MoveFile.RECENT_KEYS">
|
||||||
<recent name="$PROJECT_DIR$/src/components/navigation" />
|
<recent name="$PROJECT_DIR$/src/components/navigation" />
|
||||||
<recent name="$PROJECT_DIR$/src/components/elements/homepage" />
|
<recent name="$PROJECT_DIR$/src/components/elements/homepage" />
|
||||||
<recent name="$PROJECT_DIR$/src" />
|
<recent name="$PROJECT_DIR$/src" />
|
||||||
<recent name="$PROJECT_DIR$/src/css" />
|
<recent name="$PROJECT_DIR$/src/css" />
|
||||||
</key>
|
</key>
|
||||||
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
|
<recent name="$PROJECT_DIR$/public" />
|
||||||
|
<recent name="$PROJECT_DIR$/src/reducers" />
|
||||||
|
<recent name="$PROJECT_DIR$/src/components/elements/homepage" />
|
||||||
|
<recent name="$PROJECT_DIR$/src/ascii" />
|
||||||
|
</key>
|
||||||
</component>
|
</component>
|
||||||
<component name="SvnConfiguration">
|
<component name="SvnConfiguration">
|
||||||
<configuration />
|
<configuration />
|
||||||
|
@ -77,6 +96,12 @@
|
||||||
<workItem from="1590359928462" duration="4688000" />
|
<workItem from="1590359928462" duration="4688000" />
|
||||||
<workItem from="1590372993882" duration="19190000" />
|
<workItem from="1590372993882" duration="19190000" />
|
||||||
<workItem from="1590539117687" duration="5804000" />
|
<workItem from="1590539117687" duration="5804000" />
|
||||||
|
<workItem from="1591990547157" duration="817000" />
|
||||||
|
<workItem from="1592031143821" duration="48000" />
|
||||||
|
<workItem from="1592033216416" duration="71000" />
|
||||||
|
<workItem from="1592033332932" duration="312000" />
|
||||||
|
<workItem from="1592033666352" duration="776000" />
|
||||||
|
<workItem from="1592131255026" duration="2989000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
|
@ -131,15 +156,17 @@
|
||||||
<screen x="0" y="0" width="1920" height="1080" />
|
<screen x="0" y="0" width="1920" height="1080" />
|
||||||
</state>
|
</state>
|
||||||
<state width="1918" height="298" key="GridCell.Tab.0.right/0.0.1920.1080/1920.0.1280.1024@0.0.1920.1080" timestamp="1589199973836" />
|
<state width="1918" height="298" key="GridCell.Tab.0.right/0.0.1920.1080/1920.0.1280.1024@0.0.1920.1080" timestamp="1589199973836" />
|
||||||
<state x="391" y="182" key="SettingsEditor" timestamp="1590389869850">
|
<state x="1653" y="2" key="SettingsEditor" timestamp="1592033800617">
|
||||||
<screen x="0" y="0" width="1920" height="1080" />
|
<screen x="1280" y="0" width="1920" height="1080" />
|
||||||
</state>
|
</state>
|
||||||
<state x="391" y="182" key="SettingsEditor/0.0.1920.1080/1920.0.1280.1024@0.0.1920.1080" timestamp="1590389869850" />
|
<state x="391" y="182" key="SettingsEditor/0.0.1920.1080/1920.0.1280.1024@0.0.1920.1080" timestamp="1590389869850" />
|
||||||
<state x="534" y="-210" width="774" height="774" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1590540625923">
|
<state x="1653" y="2" key="SettingsEditor/1280.0.1920.1080/0.0.1280.1024@1280.0.1920.1080" timestamp="1592033800617" />
|
||||||
<screen x="0" y="0" width="1920" height="1080" />
|
<state x="1808" y="-270" width="774" height="774" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1592136178449">
|
||||||
|
<screen x="1280" y="0" width="1920" height="1080" />
|
||||||
</state>
|
</state>
|
||||||
<state x="538" y="-170" width="774" height="774" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser/0.0.1920.1080/1920.0.1280.1024@0.0.1920.1080" timestamp="1590396787684" />
|
<state x="538" y="-170" width="774" height="774" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser/0.0.1920.1080/1920.0.1280.1024@0.0.1920.1080" timestamp="1590396787684" />
|
||||||
<state x="534" y="-210" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser/0.0.1920.1080@0.0.1920.1080" timestamp="1590540625923" />
|
<state x="534" y="-210" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser/0.0.1920.1080@0.0.1920.1080" timestamp="1590540625923" />
|
||||||
|
<state x="1808" y="-270" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser/1280.0.1920.1080/0.0.1280.1024@1280.0.1920.1080" timestamp="1592136178449" />
|
||||||
<state x="1710" y="11" width="99" height="1060" key="dock-window-1" timestamp="1590395037402">
|
<state x="1710" y="11" width="99" height="1060" key="dock-window-1" timestamp="1590395037402">
|
||||||
<screen x="0" y="0" width="1920" height="1080" />
|
<screen x="0" y="0" width="1920" height="1080" />
|
||||||
</state>
|
</state>
|
||||||
|
@ -288,9 +315,10 @@
|
||||||
<screen x="0" y="0" width="1920" height="1080" />
|
<screen x="0" y="0" width="1920" height="1080" />
|
||||||
</state>
|
</state>
|
||||||
<state x="622" y="249" key="run.anything.popup/0.0.1920.1080/1920.0.1280.1024@0.0.1920.1080" timestamp="1590363963127" />
|
<state x="622" y="249" key="run.anything.popup/0.0.1920.1080/1920.0.1280.1024@0.0.1920.1080" timestamp="1590363963127" />
|
||||||
<state x="623" y="240" width="672" height="678" key="search.everywhere.popup" timestamp="1590395597621">
|
<state x="1903" y="240" width="672" height="678" key="search.everywhere.popup" timestamp="1592033634952">
|
||||||
<screen x="0" y="0" width="1920" height="1080" />
|
<screen x="1280" y="0" width="1920" height="1080" />
|
||||||
</state>
|
</state>
|
||||||
<state x="623" y="240" width="672" height="678" key="search.everywhere.popup/0.0.1920.1080/1920.0.1280.1024@0.0.1920.1080" timestamp="1590395597621" />
|
<state x="623" y="240" width="672" height="678" key="search.everywhere.popup/0.0.1920.1080/1920.0.1280.1024@0.0.1920.1080" timestamp="1590395597621" />
|
||||||
|
<state x="1903" y="240" width="672" height="678" key="search.everywhere.popup/1280.0.1920.1080/0.0.1280.1024@1280.0.1920.1080" timestamp="1592033634952" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -10,9 +10,9 @@
|
||||||
content="O. George's portfolio and blog"
|
content="O. George's portfolio and blog"
|
||||||
/>
|
/>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Cuprum:ital,wght@0,400;1,400;1,700&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Cuprum:ital,wght@0,400;1,400;1,700&display=swap" rel="stylesheet">
|
||||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo.png" />
|
||||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||||
<link rel="icon" type="image/svg+xml" href="app-page.svg">
|
<link rel="icon" type="image/svg+xml" href="logo.png">
|
||||||
<title>Horhik.xyz</title>
|
<title>Horhik.xyz</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
BIN
public/logo.png
Normal file
BIN
public/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
116
public/logo.svg
Normal file
116
public/logo.svg
Normal file
|
@ -0,0 +1,116 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
id="svg8"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 210 297"
|
||||||
|
height="297mm"
|
||||||
|
width="210mm">
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<rect
|
||||||
|
id="rect849"
|
||||||
|
height="42.032764"
|
||||||
|
width="55.861077"
|
||||||
|
y="181.22374"
|
||||||
|
x="157.3882" />
|
||||||
|
<rect
|
||||||
|
id="rect835"
|
||||||
|
height="103.7479"
|
||||||
|
width="127.15798"
|
||||||
|
y="110.29623"
|
||||||
|
x="53.174042" />
|
||||||
|
</defs>
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1">
|
||||||
|
<text
|
||||||
|
style="line-height:1.125;font-family:sans-serif;font-size:10.58333333px;white-space:pre;shape-inside:url(#rect835);"
|
||||||
|
id="text833"
|
||||||
|
xml:space="preserve" />
|
||||||
|
<text
|
||||||
|
style="line-height:1.125;font-family:sans-serif;font-size:10.58333333px;white-space:pre;shape-inside:url(#rect849);"
|
||||||
|
id="text847"
|
||||||
|
xml:space="preserve" />
|
||||||
|
<g
|
||||||
|
transform="translate(-6.665638,53.583117)"
|
||||||
|
id="g899">
|
||||||
|
<rect
|
||||||
|
rx="0"
|
||||||
|
style="fill:#282a36;fill-opacity:1;stroke-width:9.465;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="rect873"
|
||||||
|
width="102.57725"
|
||||||
|
height="129.46489"
|
||||||
|
x="59.264179"
|
||||||
|
y="46.933193"
|
||||||
|
transform="matrix(0,1,1,0,0,0)"
|
||||||
|
ry="18.287838" />
|
||||||
|
<rect
|
||||||
|
ry="0"
|
||||||
|
transform="matrix(0,1,1,0,0,0)"
|
||||||
|
y="46.933201"
|
||||||
|
x="26.202042"
|
||||||
|
height="129.46487"
|
||||||
|
width="63.873825"
|
||||||
|
id="rect873-6"
|
||||||
|
style="fill:#44475a;fill-opacity:1;stroke-width:9.46499;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
rx="0" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="layer2">
|
||||||
|
<text
|
||||||
|
id="text841"
|
||||||
|
y="123.47272"
|
||||||
|
x="61.213528"
|
||||||
|
style="font-size:31.1912px;line-height:1.11;font-family:sans-serif;fill:#ffb86c;fill-opacity:1;stroke-width:0.77978"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'mononoki Nerd Font';-inkscape-font-specification:'mononoki Nerd Font';fill:#ffb86c;fill-opacity:1;stroke-width:0.77978"
|
||||||
|
y="123.47272"
|
||||||
|
x="61.213528"
|
||||||
|
id="tspan839">░█░█░</tspan><tspan
|
||||||
|
id="tspan843"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'mononoki Nerd Font';-inkscape-font-specification:'mononoki Nerd Font';fill:#ffb86c;fill-opacity:1;stroke-width:0.77978"
|
||||||
|
y="158.39955"
|
||||||
|
x="61.213528">░█▀█░</tspan><tspan
|
||||||
|
id="tspan845"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'mononoki Nerd Font';-inkscape-font-specification:'mononoki Nerd Font';fill:#ffb86c;fill-opacity:1;stroke-width:0.77978"
|
||||||
|
y="193.32639"
|
||||||
|
x="61.213528">░▀░▀░</tspan></text>
|
||||||
|
<text
|
||||||
|
id="text862"
|
||||||
|
y="152.56528"
|
||||||
|
x="104.05653"
|
||||||
|
style="font-size:10.5833px;line-height:1.125;font-family:sans-serif;stroke-width:0.264583"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
style="stroke-width:0.264583"
|
||||||
|
y="152.56528"
|
||||||
|
x="104.05653"
|
||||||
|
id="tspan860" /></text>
|
||||||
|
<text
|
||||||
|
id="text871"
|
||||||
|
y="139.71835"
|
||||||
|
x="164.71696"
|
||||||
|
style="font-size:10.5833px;line-height:1.125;font-family:sans-serif;stroke-width:0.264583"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
style="stroke-width:0.264583"
|
||||||
|
y="139.71835"
|
||||||
|
x="164.71696"
|
||||||
|
id="tspan869"></tspan></text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
48
src/App.js
48
src/App.js
|
@ -1,9 +1,9 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import "./css/basic.scss";
|
import "./css/basic.scss";
|
||||||
import HomePage from "./components/pages/homepage";
|
import HomePage from "./components/pages/homepage";
|
||||||
import {connect} from 'react-redux'
|
import { connect } from "react-redux";
|
||||||
import NavHeader from "./components/navigation/nav-header";
|
import NavHeader from "./components/navigation/nav-header";
|
||||||
import {BrowserRouter, Route, Switch} from 'react-router-dom'
|
import { BrowserRouter, Route, Switch } from "react-router-dom";
|
||||||
import PageLinks from "./components/navigation/page-links";
|
import PageLinks from "./components/navigation/page-links";
|
||||||
import Logo from "./components/elements/logo";
|
import Logo from "./components/elements/logo";
|
||||||
import PortfolioPage from "./components/pages/portfolio";
|
import PortfolioPage from "./components/pages/portfolio";
|
||||||
|
@ -12,28 +12,34 @@ import pages from "./constants/routes";
|
||||||
function App(props) {
|
function App(props) {
|
||||||
return (
|
return (
|
||||||
<div className="App">
|
<div className="App">
|
||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
<Logo child={props.pageQuote} header={props.currentPageName}/>
|
<Logo child={props.pageQuote} header={props.currentPageName} />
|
||||||
<PageLinks/>
|
<PageLinks />
|
||||||
<Switch>
|
<Switch>
|
||||||
{
|
<Route
|
||||||
pages.map(page => {
|
exact
|
||||||
return(
|
path={'/'}
|
||||||
<Route exact path={page.src} component={page.page} key={page.src}/>
|
component={HomePage}
|
||||||
)
|
/>
|
||||||
})
|
<Route
|
||||||
}
|
exact
|
||||||
|
path={'/blog'}
|
||||||
|
component={BlogPage}
|
||||||
|
/>
|
||||||
|
<Route
|
||||||
|
exact
|
||||||
|
path={'/portfolio'}
|
||||||
|
component={PortfolioPage}
|
||||||
|
/>
|
||||||
</Switch>
|
</Switch>
|
||||||
</BrowserRouter>
|
</BrowserRouter>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(
|
export default connect((state) => ({
|
||||||
state => ({
|
currentPath: state.client.currentPath,
|
||||||
currentPath: state.client.currentPath,
|
currentPage: state.client.currentPage,
|
||||||
currentPage: state.client.currentPage,
|
currentPageName: state.client.currentPageName,
|
||||||
currentPageName: state.client.currentPageName,
|
pageQuote: state.client.pageQuote,
|
||||||
pageQuote: state.client.pageQuote
|
}))(App);
|
||||||
})
|
|
||||||
)(App);
|
|
||||||
|
|
|
@ -1,23 +1,20 @@
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
import {connect} from 'react-redux'
|
import { connect } from "react-redux";
|
||||||
|
|
||||||
const About = props => {
|
const About = (props) => {
|
||||||
return (
|
return (
|
||||||
<section>
|
<section>
|
||||||
<h2>
|
<h2>About me</h2>
|
||||||
About me
|
|
||||||
</h2>
|
|
||||||
<section>
|
<section>
|
||||||
<div>
|
<div>
|
||||||
<h3>Who I am?</h3>
|
<h3>Who I am?</h3>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h3>What I can?</h3>
|
<h3>What I can?</h3>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
)
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
export default connect()(About)
|
export default connect()(About);
|
||||||
|
|
|
@ -29,11 +29,11 @@ const Contacts = (props) => {
|
||||||
<ul className={"contacts"}>
|
<ul className={"contacts"}>
|
||||||
{links.map((link) => (
|
{links.map((link) => (
|
||||||
<li key={link.url}>
|
<li key={link.url}>
|
||||||
{link.mail ?
|
{link.mail ? (
|
||||||
<SocialLink url={`mailto:${link.mail}`} site={link.site} />
|
<SocialLink url={`mailto:${link.mail}`} site={link.site} />
|
||||||
:
|
) : (
|
||||||
<SocialLink url={link.url} site={link.site} />
|
<SocialLink url={link.url} site={link.site} />
|
||||||
}
|
)}
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
|
import { Link } from "react-router-dom/cjs/react-router-dom.min";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* props: {
|
* props: {
|
||||||
|
@ -12,12 +13,13 @@ import { connect } from "react-redux";
|
||||||
|
|
||||||
const RecentBlock = (props) => {
|
const RecentBlock = (props) => {
|
||||||
return (
|
return (
|
||||||
<a
|
<Link
|
||||||
href={props.link}
|
to={props.src}
|
||||||
className={`recent-block recent-block--${props.pos || "right"}`}
|
className={`recent-block recent-block--${props.pos === ('github') ? 'right' : "left"}`}
|
||||||
>
|
>
|
||||||
{props.header || "no content loaded..."}
|
{props.header || "no content loaded..."}
|
||||||
</a>
|
</Link>
|
||||||
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3,29 +3,24 @@ import { connect } from "react-redux";
|
||||||
import RecentBlock from "./recent-block";
|
import RecentBlock from "./recent-block";
|
||||||
import Contacts from "../contacts";
|
import Contacts from "../contacts";
|
||||||
|
|
||||||
const Recent = (props) => {
|
const Recent = ({recent}) => {
|
||||||
return (
|
return (
|
||||||
<section className={"recent"}>
|
<section className={"recent"}>
|
||||||
<h1 className={"h1 recent-header"}>Recent</h1>
|
<h1 className={"h1 recent-header"}>Recent</h1>
|
||||||
<ul className="recent-list">
|
<ul className="recent-list">
|
||||||
<li>
|
{recent.map((page) => {
|
||||||
<RecentBlock link={"/portfolio"} header={'Added "TaSquare" project to portfolio '} pos={"right"} />
|
return (
|
||||||
</li>
|
<li key={page.src} >
|
||||||
|
<RecentBlock src={page.src} header={page.content} pos={page.type}>
|
||||||
<li>
|
</RecentBlock>
|
||||||
<RecentBlock link={"/portfolio"} header={'Added Snake game to portfolio'} pos={"right"} />
|
</li>
|
||||||
</li>
|
);
|
||||||
|
})}
|
||||||
<li>
|
</ul>
|
||||||
<RecentBlock
|
|
||||||
link={"/portfolio"}
|
|
||||||
header={'Added "AnkiLan" project to portfolio'}
|
|
||||||
pos="right"
|
|
||||||
/>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default connect()(Recent);
|
export default connect(state => ({
|
||||||
|
recent: state.content.recentNews
|
||||||
|
}))(Recent);
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Contacts from "../elements/contacts";
|
||||||
|
|
||||||
const BlogArticlePreview = (props) => {
|
const BlogArticlePreview = (props) => {
|
||||||
return (
|
return (
|
||||||
<div className={ `blog-posts__item--${props.pos}`}>
|
<div className={`blog-posts__item--${props.pos}`}>
|
||||||
<h2 className={"blog-post__header"}>
|
<h2 className={"blog-post__header"}>
|
||||||
<a href={"#article"} className={"link"}>
|
<a href={"#article"} className={"link"}>
|
||||||
{props.post.name}
|
{props.post.name}
|
||||||
|
@ -12,8 +12,12 @@ const BlogArticlePreview = (props) => {
|
||||||
</h2>
|
</h2>
|
||||||
<p>{props.post.description}</p>
|
<p>{props.post.description}</p>
|
||||||
<ul className={"blog-info__list"}>
|
<ul className={"blog-info__list"}>
|
||||||
<li className={"blog-info__item blog-info__item--created"}>{props.post.created}</li>
|
<li className={"blog-info__item blog-info__item--created"}>
|
||||||
<li className={"blog-info__item blog-info__item--reading-time"}>{props.post.readingTime}</li>
|
{props.post.created}
|
||||||
|
</li>
|
||||||
|
<li className={"blog-info__item blog-info__item--reading-time"}>
|
||||||
|
{props.post.readingTime}
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -22,7 +26,7 @@ const BlogArticlePreview = (props) => {
|
||||||
const BlogPage = (props) => {
|
const BlogPage = (props) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h2 className={'nothing'} >There's nothing here yet</h2>
|
<h2 className={"nothing"}>There's nothing here yet</h2>
|
||||||
|
|
||||||
{/*<ul className={"blog-posts"}>*/}
|
{/*<ul className={"blog-posts"}>*/}
|
||||||
{/* {props.posts.map((post, index) => {*/}
|
{/* {props.posts.map((post, index) => {*/}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import Contacts from "../elements/contacts";
|
import Contacts from "../elements/contacts";
|
||||||
import {APP} from "../../constants/link-types";
|
import { APP } from "../../constants/link-types";
|
||||||
|
|
||||||
const PortfolioItem = (props) => {
|
const PortfolioItem = (props) => {
|
||||||
const name = props.project.name;
|
const name = props.project.name;
|
||||||
|
@ -24,7 +24,15 @@ const PortfolioItem = (props) => {
|
||||||
key={link.src}
|
key={link.src}
|
||||||
className={`project-link project-link--${link.type}`}
|
className={`project-link project-link--${link.type}`}
|
||||||
>
|
>
|
||||||
{link.type === APP && link.logo ? <img className={'project-link__logo'} src={link.logo} alt="TaSquare logo"/>: ''}
|
{link.type === APP && link.logo ? (
|
||||||
|
<img
|
||||||
|
className={"project-link__logo"}
|
||||||
|
src={link.logo}
|
||||||
|
alt="TaSquare logo"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
""
|
||||||
|
)}
|
||||||
|
|
||||||
<a className={"link"} href={link.src}>
|
<a className={"link"} href={link.src}>
|
||||||
{link.name}
|
{link.name}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export const APP = "app"
|
export const APP = "app";
|
||||||
export const GITHUB = "github"
|
export const GITHUB = "github";
|
||||||
export const IPHONE = "iphone"
|
export const IPHONE = "iphone";
|
||||||
export const ANDROID = "android"
|
export const ANDROID = "android";
|
||||||
export const APP_PAGE = "app-page"
|
export const APP_PAGE = "app-page";
|
||||||
export const DEFAULT_DOMAIN = "horhik.xyz"
|
export const DEFAULT_DOMAIN = "horhik.xyz";
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import BlogPage from "../components/pages/blog";
|
import BlogPage from "../components/pages/blog";
|
||||||
import PortfolioPage from "../components/pages/portfolio";
|
import PortfolioPage from "../components/pages/portfolio";
|
||||||
import HomePage from "../components/pages/homepage";
|
import HomePage from "../components/pages/homepage";
|
||||||
import {DEFAULT_DOMAIN} from '../constants/link-types'
|
import { DEFAULT_DOMAIN } from "../constants/link-types";
|
||||||
|
|
||||||
const pages = [
|
const pages = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
import App from "./App";
|
import App from "./App";
|
||||||
import {Provider} from "react-redux";
|
import { Provider } from "react-redux";
|
||||||
import store from "./store";
|
import store from "./store";
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<App />
|
<App />
|
||||||
</Provider>
|
</Provider>
|
||||||
</React.StrictMode>,
|
</React.StrictMode>,
|
||||||
document.getElementById("root")
|
document.getElementById("root")
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { SET_CURRENT_PAGE } from "../constants/routes";
|
import { SET_CURRENT_PAGE } from "../constants/routes";
|
||||||
import HomePage from "../components/pages/homepage";
|
import HomePage from "../components/pages/homepage";
|
||||||
import {DEFAULT_DOMAIN} from "../constants/link-types"
|
import { DEFAULT_DOMAIN } from "../constants/link-types";
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
lang: "en",
|
lang: "en",
|
||||||
|
|
|
@ -1,19 +1,35 @@
|
||||||
import {DEFAULT_DOMAIN, APP, APP_PAGE, GITHUB} from "../constants/link-types";
|
import { DEFAULT_DOMAIN, APP, APP_PAGE, GITHUB } from "../constants/link-types";
|
||||||
|
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
recentNews: ["nope"],
|
recentNews: [
|
||||||
|
{
|
||||||
|
src: '/portfolio',
|
||||||
|
type: 'github',
|
||||||
|
content: 'Added "TaSquare" project to portfolio ',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
src: '/portfolio',
|
||||||
|
type: 'github',
|
||||||
|
content: 'Added Snake game to portfolio',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
src: '/portfolio',
|
||||||
|
type: 'github',
|
||||||
|
content: 'Added "AnkiLan" project to portfolio',
|
||||||
|
},
|
||||||
|
],
|
||||||
portfolioItems: [
|
portfolioItems: [
|
||||||
{
|
{
|
||||||
name: 'AnkiLan',
|
name: "AnkiLan",
|
||||||
description: 'The app created for pushing cards with english words and their definitions to Anki',
|
description:
|
||||||
|
"The app created for pushing cards with english words and their definitions to Anki",
|
||||||
gallery: [],
|
gallery: [],
|
||||||
pageLink: '',
|
pageLink: "",
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
name: 'GitHub page',
|
name: "GitHub page",
|
||||||
type: GITHUB,
|
type: GITHUB,
|
||||||
src: 'https://github.com/horhik/ankilan'
|
src: "https://github.com/horhik/ankilan",
|
||||||
},
|
},
|
||||||
/*{
|
/*{
|
||||||
name: 'App page',
|
name: 'App page',
|
||||||
|
@ -21,74 +37,76 @@ const initialState = {
|
||||||
src: 'https://github.com'
|
src: 'https://github.com'
|
||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Snake Game',
|
name: "Snake Game",
|
||||||
description: 'Just the "Snake" game with smooth graphics',
|
description: 'Just the "Snake" game with smooth graphics',
|
||||||
gallery: [],
|
gallery: [],
|
||||||
pageLink: '',
|
pageLink: "",
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
name: 'GitHub page',
|
name: "GitHub page",
|
||||||
type: GITHUB,
|
type: GITHUB,
|
||||||
src: 'https://github.com/horhik/snake'
|
src: "https://github.com/horhik/snake",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'Game page',
|
name: "Game page",
|
||||||
type: APP,
|
type: APP,
|
||||||
src: 'https://smoothsnake.netlify.app',
|
src: "https://smoothsnake.netlify.app",
|
||||||
// logo: 'https://raw.githubusercontent.com/Horhik/tasquare/master/src/svg/logo.svg'
|
// logo: 'https://raw.githubusercontent.com/Horhik/tasquare/master/src/svg/logo.svg'
|
||||||
}
|
},
|
||||||
|
],
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'TaSquare',
|
name: "TaSquare",
|
||||||
description: 'TODO app for mobile',
|
description: "TODO app for mobile",
|
||||||
gallery: [],
|
gallery: [],
|
||||||
pageLink: '',
|
pageLink: "",
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
name: 'GitHub page',
|
name: "GitHub page",
|
||||||
type: GITHUB,
|
type: GITHUB,
|
||||||
src: 'https://github.com/horhik/tasquare'
|
src: "https://github.com/horhik/tasquare",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'App page',
|
name: "App page",
|
||||||
type: APP,
|
type: APP,
|
||||||
src: 'https://tasquare.netlify.app',
|
src: "https://tasquare.netlify.app",
|
||||||
logo: 'https://raw.githubusercontent.com/Horhik/tasquare/master/src/svg/logo.svg'
|
logo:
|
||||||
}
|
"https://raw.githubusercontent.com/Horhik/tasquare/master/src/svg/logo.svg",
|
||||||
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
blogPageContent:[
|
blogPageContent: [
|
||||||
{
|
{
|
||||||
name: 'The point of life by Linus Torvalds',
|
name: "The point of life by Linus Torvalds",
|
||||||
description: 'Some about OpenSource philosophy and “just for fun” by Linus Torvalds',
|
description:
|
||||||
created: '02.04.2021',
|
"Some about OpenSource philosophy and “just for fun” by Linus Torvalds",
|
||||||
readingTime: '8min read',
|
created: "02.04.2021",
|
||||||
src: `https://${DEFAULT_DOMAIN}`
|
readingTime: "8min read",
|
||||||
|
src: `https://${DEFAULT_DOMAIN}`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Haskell on Back-end, how it is?',
|
name: "Haskell on Back-end, how it is?",
|
||||||
description: 'This site’s back-end written on haskell, let’s talks about privileges of haskell on backend',
|
description:
|
||||||
created: '11.03.2020',
|
"This site’s back-end written on haskell, let’s talks about privileges of haskell on backend",
|
||||||
readingTime: '11min read',
|
created: "11.03.2020",
|
||||||
src: `https://${DEFAULT_DOMAIN}`
|
readingTime: "11min read",
|
||||||
|
src: `https://${DEFAULT_DOMAIN}`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'ArchLinux and a lot of tiling window managers',
|
name: "ArchLinux and a lot of tiling window managers",
|
||||||
description: 'Did you try something another than floating windows, like in windows?',
|
description:
|
||||||
created: '01.09.2020',
|
"Did you try something another than floating windows, like in windows?",
|
||||||
readingTime: '4min read',
|
created: "01.09.2020",
|
||||||
src: `https://${DEFAULT_DOMAIN}`
|
readingTime: "4min read",
|
||||||
}
|
src: `https://${DEFAULT_DOMAIN}`,
|
||||||
]
|
},
|
||||||
}
|
],
|
||||||
|
};
|
||||||
|
|
||||||
const siteContentReducer = (state = initialState, action) => {
|
const siteContentReducer = (state = initialState, action) => {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
// opt-in, read https://bit.ly/CRA-PWA
|
// opt-in, read https://bit.ly/CRA-PWA
|
||||||
|
|
||||||
const isLocalhost = Boolean(
|
const isLocalhost = Boolean(
|
||||||
window.location.hostname === 'localhost' ||
|
window.location.hostname === "localhost" ||
|
||||||
// [::1] is the IPv6 localhost address.
|
// [::1] is the IPv6 localhost address.
|
||||||
window.location.hostname === '[::1]' ||
|
window.location.hostname === "[::1]" ||
|
||||||
// 127.0.0.0/8 are considered localhost for IPv4.
|
// 127.0.0.0/8 are considered localhost for IPv4.
|
||||||
window.location.hostname.match(
|
window.location.hostname.match(
|
||||||
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
||||||
|
@ -21,7 +21,7 @@ const isLocalhost = Boolean(
|
||||||
);
|
);
|
||||||
|
|
||||||
export function register(config) {
|
export function register(config) {
|
||||||
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
|
if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) {
|
||||||
// The URL constructor is available in all browsers that support SW.
|
// The URL constructor is available in all browsers that support SW.
|
||||||
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
|
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
|
||||||
if (publicUrl.origin !== window.location.origin) {
|
if (publicUrl.origin !== window.location.origin) {
|
||||||
|
@ -31,7 +31,7 @@ export function register(config) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('load', () => {
|
window.addEventListener("load", () => {
|
||||||
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
|
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
|
||||||
|
|
||||||
if (isLocalhost) {
|
if (isLocalhost) {
|
||||||
|
@ -42,8 +42,8 @@ export function register(config) {
|
||||||
// service worker/PWA documentation.
|
// service worker/PWA documentation.
|
||||||
navigator.serviceWorker.ready.then(() => {
|
navigator.serviceWorker.ready.then(() => {
|
||||||
console.log(
|
console.log(
|
||||||
'This web app is being served cache-first by a service ' +
|
"This web app is being served cache-first by a service " +
|
||||||
'worker. To learn more, visit https://bit.ly/CRA-PWA'
|
"worker. To learn more, visit https://bit.ly/CRA-PWA"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -57,21 +57,21 @@ export function register(config) {
|
||||||
function registerValidSW(swUrl, config) {
|
function registerValidSW(swUrl, config) {
|
||||||
navigator.serviceWorker
|
navigator.serviceWorker
|
||||||
.register(swUrl)
|
.register(swUrl)
|
||||||
.then(registration => {
|
.then((registration) => {
|
||||||
registration.onupdatefound = () => {
|
registration.onupdatefound = () => {
|
||||||
const installingWorker = registration.installing;
|
const installingWorker = registration.installing;
|
||||||
if (installingWorker == null) {
|
if (installingWorker == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
installingWorker.onstatechange = () => {
|
installingWorker.onstatechange = () => {
|
||||||
if (installingWorker.state === 'installed') {
|
if (installingWorker.state === "installed") {
|
||||||
if (navigator.serviceWorker.controller) {
|
if (navigator.serviceWorker.controller) {
|
||||||
// At this point, the updated precached content has been fetched,
|
// At this point, the updated precached content has been fetched,
|
||||||
// but the previous service worker will still serve the older
|
// but the previous service worker will still serve the older
|
||||||
// content until all client tabs are closed.
|
// content until all client tabs are closed.
|
||||||
console.log(
|
console.log(
|
||||||
'New content is available and will be used when all ' +
|
"New content is available and will be used when all " +
|
||||||
'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
|
"tabs for this page are closed. See https://bit.ly/CRA-PWA."
|
||||||
);
|
);
|
||||||
|
|
||||||
// Execute callback
|
// Execute callback
|
||||||
|
@ -82,7 +82,7 @@ function registerValidSW(swUrl, config) {
|
||||||
// At this point, everything has been precached.
|
// At this point, everything has been precached.
|
||||||
// It's the perfect time to display a
|
// It's the perfect time to display a
|
||||||
// "Content is cached for offline use." message.
|
// "Content is cached for offline use." message.
|
||||||
console.log('Content is cached for offline use.');
|
console.log("Content is cached for offline use.");
|
||||||
|
|
||||||
// Execute callback
|
// Execute callback
|
||||||
if (config && config.onSuccess) {
|
if (config && config.onSuccess) {
|
||||||
|
@ -93,25 +93,25 @@ function registerValidSW(swUrl, config) {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch((error) => {
|
||||||
console.error('Error during service worker registration:', error);
|
console.error("Error during service worker registration:", error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkValidServiceWorker(swUrl, config) {
|
function checkValidServiceWorker(swUrl, config) {
|
||||||
// Check if the service worker can be found. If it can't reload the page.
|
// Check if the service worker can be found. If it can't reload the page.
|
||||||
fetch(swUrl, {
|
fetch(swUrl, {
|
||||||
headers: { 'Service-Worker': 'script' },
|
headers: { "Service-Worker": "script" },
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then((response) => {
|
||||||
// Ensure service worker exists, and that we really are getting a JS file.
|
// Ensure service worker exists, and that we really are getting a JS file.
|
||||||
const contentType = response.headers.get('content-type');
|
const contentType = response.headers.get("content-type");
|
||||||
if (
|
if (
|
||||||
response.status === 404 ||
|
response.status === 404 ||
|
||||||
(contentType != null && contentType.indexOf('javascript') === -1)
|
(contentType != null && contentType.indexOf("javascript") === -1)
|
||||||
) {
|
) {
|
||||||
// No service worker found. Probably a different app. Reload the page.
|
// No service worker found. Probably a different app. Reload the page.
|
||||||
navigator.serviceWorker.ready.then(registration => {
|
navigator.serviceWorker.ready.then((registration) => {
|
||||||
registration.unregister().then(() => {
|
registration.unregister().then(() => {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
|
@ -123,18 +123,18 @@ function checkValidServiceWorker(swUrl, config) {
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
console.log(
|
console.log(
|
||||||
'No internet connection found. App is running in offline mode.'
|
"No internet connection found. App is running in offline mode."
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function unregister() {
|
export function unregister() {
|
||||||
if ('serviceWorker' in navigator) {
|
if ("serviceWorker" in navigator) {
|
||||||
navigator.serviceWorker.ready
|
navigator.serviceWorker.ready
|
||||||
.then(registration => {
|
.then((registration) => {
|
||||||
registration.unregister();
|
registration.unregister();
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch((error) => {
|
||||||
console.error(error.message);
|
console.error(error.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
import { createStore } from 'redux'
|
import { createStore } from "redux";
|
||||||
import rootReducer from "./reducers/all-reducers";
|
import rootReducer from "./reducers/all-reducers";
|
||||||
|
|
||||||
const store = createStore(rootReducer, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__())
|
const store = createStore(
|
||||||
|
rootReducer,
|
||||||
|
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
|
||||||
|
);
|
||||||
|
|
||||||
export default store
|
export default store;
|
||||||
|
|
Loading…
Reference in a new issue