File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
11
11
UserRoundPlusIcon ,
12
12
VolumeOffIcon ,
13
13
} from 'lucide-react' ;
14
- import { useLocation , useNavigate } from '@tanstack/react-router' ;
14
+ import { useNavigate } from '@tanstack/react-router' ;
15
15
import { MessageCircle , Heart , Repeat } from 'lucide-react' ;
16
16
import { useLike } from '../lib/bluesky/hooks/useLike' ;
17
17
import { BSkyPost } from '../lib/bluesky/types/BSkyPost' ;
@@ -61,8 +61,7 @@ const BetterContext = ({ context }: { context?: string }) => {
61
61
} ;
62
62
63
63
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' ;
66
65
const handleTranslate = async ( event : React . MouseEvent < HTMLDivElement > ) => {
67
66
event . stopPropagation ( ) ;
68
67
const response = await fetch ( isProd ? 'https://translate.akari.blue' : 'http://localhost:8787' , {
You can’t perform that action at this time.
0 commit comments