summaryrefslogtreecommitdiffhomepage
path: root/packages/storybook/.storybook/mocks/app/context/platform.ts
blob: 74233cd1e5c7d6a802832569a4d5967dd38374b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import type { Platform } from "../../../../../app/src/context/platform"

const value: Platform = {
  platform: "web",
  openLink() {},
  restart: async () => {},
  back() {},
  forward() {},
  notify: async () => {},
  fetch: globalThis.fetch.bind(globalThis),
  parseMarkdown: async (markdown: string) => markdown,
}

export function usePlatform() {
  return value
}