permalinks: navigate on-click

Fixes urbit/landscape#859
This commit is contained in:
Matilde Park 2021-05-07 12:23:52 -04:00
parent e84aab0bd8
commit 364c30b6bb
2 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ interface GroupPermalink {
group: string;
link: string;
}
interface GraphPermalink {
export interface GraphPermalink {
type: 'graph';
link: string;
graph: string;

View File

@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useState } from "react";
import { useHistory, useLocation, Link } from 'react-router-dom';
import { Association, GraphNode, resourceFromPath } from '@urbit/api';
import GlobalApi from '~/logic/api/global';
import {
import {
getPermalinkForGraph, GraphPermalink as IGraphPermalink, parsePermalink
} from '~/logic/lib/permalinks';
import {
@ -115,7 +115,7 @@ function GraphPermalink(
borderRadius="2"
cursor='pointer'
onClick={(e) => {
e.stopPropagation();
navigate(e);
}}
>
{showTransclusion && index && (