Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit14674b4

Browse files
committed
Remove reload and use link for new tab
1 parent35f6d0e commit14674b4

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

‎site/src/pages/TaskPage/TaskAppIframe.tsx

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import {
1212
HouseIcon,
1313
RotateCwIcon,
1414
}from"lucide-react";
15-
import{openAppInNewWindow}from"modules/apps/apps";
1615
import{useAppLink}from"modules/apps/useAppLink";
1716
importtype{Task}from"modules/tasks/tasks";
1817
import{typeFC,useRef}from"react";
18+
import{LinkasRouterLink}from"react-router-dom";
1919
import{cn}from"utils/cn";
2020

2121
typeTaskAppIFrameProps={
@@ -64,20 +64,6 @@ export const TaskAppIFrame: FC<TaskAppIFrameProps> = ({
6464
return(
6565
<divclassName={cn([active ?"flex" :"hidden","w-full h-full flex-col"])}>
6666
<divclassName="bg-surface-tertiary flex items-center p-2 py-1 gap-1">
67-
<Button
68-
size="icon"
69-
variant="subtle"
70-
onClick={(e)=>{
71-
e.preventDefault();
72-
if(frameRef.current?.contentWindow){
73-
frameRef.current.contentWindow.location.reload();
74-
}
75-
}}
76-
>
77-
<RotateCwIcon/>
78-
<spanclassName="sr-only">Refresh</span>
79-
</Button>
80-
8167
<Button
8268
size="icon"
8369
variant="subtle"
@@ -104,13 +90,11 @@ export const TaskAppIFrame: FC<TaskAppIFrameProps> = ({
10490
</Button>
10591
</DropdownMenuTrigger>
10692
<DropdownMenuContentalign="end">
107-
<DropdownMenuItem
108-
onClick={()=>{
109-
openAppInNewWindow(frameSrc);
110-
}}
111-
>
112-
<ExternalLinkIcon/>
113-
Open app in new tab
93+
<DropdownMenuItemasChild>
94+
<RouterLinkto={frameSrc}target="_blank">
95+
<ExternalLinkIcon/>
96+
Open app in new tab
97+
</RouterLink>
11498
</DropdownMenuItem>
11599
</DropdownMenuContent>
116100
</DropdownMenu>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp