Skip to content

Commit cc669c6

Browse files
committed
fix: posts not rendering
1 parent 80915a5 commit cc669c6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/PostCard.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
UserRoundPlusIcon,
1212
VolumeOffIcon,
1313
} from 'lucide-react';
14-
import { useLocation, useNavigate } from '@tanstack/react-router';
14+
import { useNavigate } from '@tanstack/react-router';
1515
import { MessageCircle, Heart, Repeat } from 'lucide-react';
1616
import { useLike } from '../lib/bluesky/hooks/useLike';
1717
import { BSkyPost } from '../lib/bluesky/types/BSkyPost';
@@ -61,8 +61,7 @@ const BetterContext = ({ context }: { context?: string }) => {
6161
};
6262

6363
const PostDropdownMenu = ({ post, setTranslatedText }: { post: BSkyPost; setTranslatedText: (text: string) => void }) => {
64-
const location = useLocation();
65-
const isProd = new URL(location.href).hostname === 'akari.blue';
64+
const isProd = window.location.hostname === 'akari.blue';
6665
const handleTranslate = async (event: React.MouseEvent<HTMLDivElement>) => {
6766
event.stopPropagation();
6867
const response = await fetch(isProd ? 'https://translate.akari.blue' : 'http://localhost:8787', {

0 commit comments

Comments
 (0)