fix: add platform selector to storybook (#4380)

This commit is contained in:
Peng Xiao
2023-09-15 16:59:29 +08:00
committed by GitHub
parent f730f2b242
commit eea38a08c5
12 changed files with 81 additions and 26 deletions

View File

@@ -1,4 +1,3 @@
import { isDesktop } from '@affine/env/constant';
import {
generateRandUTF16Chars,
SPAN_ID_BYTES,
@@ -48,7 +47,7 @@ function onRejectHandleTrace<T>(
export const signInCloud: typeof signIn = async (provider, ...rest) => {
const traceParams = genTraceParams();
if (isDesktop) {
if (environment.isDesktop) {
if (provider === 'google') {
open(
`${
@@ -104,7 +103,7 @@ export const signOutCloud: typeof signOut = async options => {
export function buildCallbackUrl(callbackUrl: string) {
const params: string[][] = [];
if (isDesktop && window.appInfo.schema) {
if (environment.isDesktop && window.appInfo.schema) {
params.push(['schema', window.appInfo.schema]);
}
const query =