Skip to content

Commit 9b30112

Browse files
committed
fix: links not opening in desktop
1 parent 715b00d commit 9b30112

1 file changed

Lines changed: 16 additions & 17 deletions

File tree

src/components/ActionBar/account.tsx

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Anchor, Box, Button, Group, Menu, Text } from "@mantine/core";
1+
import { Box, Button, Group, Menu, Text } from "@mantine/core";
22
import {
33
Icon,
44
iconBook,
@@ -11,6 +11,7 @@ import {
1111
iconSun,
1212
iconTune,
1313
} from "@surrealdb/ui";
14+
import { adapter } from "~/adapter";
1415
import { useSetting } from "~/hooks/config";
1516
import { useTheme } from "~/hooks/theme";
1617
import { useAuthentication } from "~/providers/Auth";
@@ -112,22 +113,20 @@ export function CloudAccount() {
112113
</Menu.Item>
113114
)}
114115
<Menu.Divider />
115-
<Anchor href="https://surrealdb.com/docs">
116-
<Menu.Item
117-
leftSection={<Icon path={iconBook} />}
118-
rightSection={<Icon path={iconOpen} />}
119-
>
120-
Documentation
121-
</Menu.Item>
122-
</Anchor>
123-
<Anchor href="https://account.surrealdb.com">
124-
<Menu.Item
125-
leftSection={<Icon path={iconTune} />}
126-
rightSection={<Icon path={iconOpen} />}
127-
>
128-
Account settings
129-
</Menu.Item>
130-
</Anchor>
116+
<Menu.Item
117+
leftSection={<Icon path={iconBook} />}
118+
rightSection={<Icon path={iconOpen} />}
119+
onClick={() => adapter.openUrl("https://surrealdb.com/docs")}
120+
>
121+
Documentation
122+
</Menu.Item>
123+
<Menu.Item
124+
leftSection={<Icon path={iconTune} />}
125+
rightSection={<Icon path={iconOpen} />}
126+
onClick={() => adapter.openUrl("https://account.surrealdb.com")}
127+
>
128+
Account settings
129+
</Menu.Item>
131130
<Menu.Divider />
132131
<Menu.Item
133132
leftSection={<Icon path={iconExitToAp} />}

0 commit comments

Comments
 (0)