fix: correctly link agent name in app urls (#3672)

This commit is contained in:
Garrett Delfosse
2022-08-24 16:49:03 +00:00
committed by GitHub
parent ca3c0490e0
commit 1400d7cd84
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -13,6 +13,7 @@ export const Language = {
export interface AppLinkProps {
userName: TypesGen.User["username"]
workspaceName: TypesGen.Workspace["name"]
agentName: TypesGen.WorkspaceAgent["name"]
appName: TypesGen.WorkspaceApp["name"]
appIcon?: TypesGen.WorkspaceApp["icon"]
}
@@ -20,11 +21,12 @@ export interface AppLinkProps {
export const AppLink: FC<PropsWithChildren<AppLinkProps>> = ({
userName,
workspaceName,
agentName,
appName,
appIcon,
}) => {
const styles = useStyles()
const href = `/@${userName}/${workspaceName}/apps/${appName}`
const href = `/@${userName}/${workspaceName}.${agentName}/apps/${appName}`
return (
<Link
@@ -131,6 +131,7 @@ export const Resources: FC<React.PropsWithChildren<ResourcesProps>> = ({
appName={app.name}
userName={workspace.owner_name}
workspaceName={workspace.name}
agentName={agent.name}
/>
))}
</div>