Skip to content

Commit

Permalink
Remove getRoute from PostPreview.
Browse files Browse the repository at this point in the history
  • Loading branch information
Corofides committed Nov 8, 2023
1 parent 22d9364 commit f904ffe
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Widgets/PostPreview/Views/Loaded/Loaded.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import {css} from "glamor";
import useSettings from "../../../../Hooks/useSettings";

const Loaded = ({id, published, name, author, image = false, setRoute, ...props}) => {
const Loaded = ({id, published, name, author, image = false, ...props}) => {

const {settings} = useSettings();

Expand Down Expand Up @@ -37,11 +37,7 @@ const Loaded = ({id, published, name, author, image = false, setRoute, ...props}
});

return (
<a onClick={() => {

setRoute("/posts/" + id);

}} href={process.env.REACT_APP_SITE_URL + "#posts/" + id} {...props} {...postPreviewRule} className={"PostPreview"}>
<a href={process.env.REACT_APP_SITE_URL + "#posts/" + id} {...props} {...postPreviewRule} className={"PostPreview"}>
{image ? <div {...imageRule} className={"PostPreview__Image"} /> : null}
<div className={"PostPreview__Info"}>
<span {...subTextRule} className={"PostPreview__Published"}>{published}</span>
Expand Down

0 comments on commit f904ffe

Please sign in to comment.