Skip to content

Commit

Permalink
chore(feed): Rename react hook
Browse files Browse the repository at this point in the history
  • Loading branch information
WaDadidou committed Nov 18, 2024
1 parent 31d9120 commit 2839001
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ActivityIndicator } from "react-native-paper";

import thumbDownSVG from "../../../../assets/icons/thumb-down.svg";
import { Post } from "../../../api/feed/v1/feed";
import { useSocialReactions } from "../../../hooks/feed/useSocialReactions";
import { useReactToPost } from "../../../hooks/feed/useReactToPost";
import { DISLIKE_EMOJI } from "../../../utils/social-feed";
import { neutral22, secondaryColor } from "../../../utils/style/colors";
import { fontSemibold13 } from "../../../utils/style/fonts";
Expand All @@ -17,7 +17,7 @@ export const DislikeButton: FC<{
post: Post;
setPost: Dispatch<SetStateAction<Post>>;
}> = ({ post, setPost }) => {
const { handleReact, isReactLoading } = useSocialReactions({
const { handleReact, isReactLoading } = useReactToPost({
post,
setPost,
});
Expand Down
4 changes: 2 additions & 2 deletions packages/components/socialFeed/SocialActions/LikeButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ActivityIndicator } from "react-native-paper";

import thumbUpSVG from "../../../../assets/icons/thumb-up.svg";
import { Post } from "../../../api/feed/v1/feed";
import { useSocialReactions } from "../../../hooks/feed/useSocialReactions";
import { useReactToPost } from "../../../hooks/feed/useReactToPost";
import { LIKE_EMOJI } from "../../../utils/social-feed";
import { neutral22, secondaryColor } from "../../../utils/style/colors";
import { fontSemibold13 } from "../../../utils/style/fonts";
Expand All @@ -17,7 +17,7 @@ export const LikeButton: FC<{
post: Post;
setPost: Dispatch<SetStateAction<Post>>;
}> = ({ post, setPost }) => {
const { handleReact, isReactLoading } = useSocialReactions({
const { handleReact, isReactLoading } = useReactToPost({
post,
setPost,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ShareButton } from "../SocialActions/ShareButton";
import { TipButton } from "../SocialActions/TipButton";

import { Post } from "@/api/feed/v1/feed";
import { useSocialReactions } from "@/hooks/feed/useSocialReactions";
import { useReactToPost } from "@/hooks/feed/useReactToPost";
import useSelectedWallet from "@/hooks/useSelectedWallet";
import { NetworkKind, getNetwork } from "@/networks";

Expand All @@ -34,7 +34,7 @@ export const SocialCardFooter: FC<{
}) => {
const wallet = useSelectedWallet();
const postNetwork = getNetwork(post.networkId);
const { handleReact, isReactLoading } = useSocialReactions({
const { handleReact, isReactLoading } = useReactToPost({
post,
setPost,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
} from "@/utils/social-feed";
import { PostCategory } from "@/utils/types/feed";

export const useSocialReactions = ({
export const useReactToPost = ({
post,
setPost,
}: {
Expand Down
4 changes: 2 additions & 2 deletions packages/screens/Mini/Feed/components/PostActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Spinner } from "@/components/Spinner";
import { EmojiSelector } from "@/components/socialFeed/EmojiSelector";
import { TipButton } from "@/components/socialFeed/SocialActions/TipButton";
import { SpacerRow } from "@/components/spacer";
import { useSocialReactions } from "@/hooks/feed/useSocialReactions";
import { useReactToPost } from "@/hooks/feed/useReactToPost";
import { layout } from "@/utils/style/layout";

type CardFooterProps = {
Expand All @@ -20,7 +20,7 @@ type CardFooterProps = {

export function PostActions({ post, setPost }: CardFooterProps) {
const wallet = useSelectedWallet();
const { handleReact, isReactLoading } = useSocialReactions({
const { handleReact, isReactLoading } = useReactToPost({
post,
setPost,
});
Expand Down

0 comments on commit 2839001

Please sign in to comment.