mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-20 14:54:22 +01:00
fix: connect vote button in post actions
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useEffect, useState } from "react"
|
||||
import { Helmet } from "react-helmet";
|
||||
import { BsFillLightningChargeFill } from "react-icons/bs";
|
||||
import { Grid } from "react-loader-spinner";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
@@ -99,6 +100,10 @@ export default function LoginPage() {
|
||||
|
||||
return (
|
||||
<div className="min-h-[80vh] page-container flex flex-col justify-center items-center">
|
||||
<Helmet>
|
||||
<title>{`makers.bolt.fun`}</title>
|
||||
<meta property="og:title" content={`makers.bolt.fun`} />
|
||||
</Helmet>
|
||||
{content}
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -25,9 +25,15 @@ export default function PostActions({ post, isPreview }: Props) {
|
||||
},
|
||||
];
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
const vote = () => { }
|
||||
|
||||
|
||||
const navigate = useNavigate();
|
||||
const { vote } = useVote({
|
||||
itemId: post.id,
|
||||
itemType: Vote_Item_Type[post.__typename!]
|
||||
});
|
||||
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -21,7 +21,8 @@ export const useUpdateStory = (story: Story) => {
|
||||
deleteStoryId: story.id
|
||||
},
|
||||
onError: (error) => NotificationsService.error('Unexpected error happened, please try again', { error }),
|
||||
onCompleted: () => window.location.pathname = '/blog'
|
||||
onCompleted: () => window.location.pathname = '/blog',
|
||||
refetchQueries: ['Feed', 'TrendingPosts']
|
||||
})
|
||||
|
||||
const handleEdit = () => {
|
||||
|
||||
Reference in New Issue
Block a user