mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
chore(web): new lint setup (#30020)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
'use client'
|
||||
import { IS_CLOUD_EDITION } from '@/config'
|
||||
import type { FC } from 'react'
|
||||
import React, { useEffect } from 'react'
|
||||
import { IS_CLOUD_EDITION } from '@/config'
|
||||
import usePSInfo from './use-ps-info'
|
||||
|
||||
const PartnerStack: FC = () => {
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { PARTNER_STACK_CONFIG } from '@/config'
|
||||
import { useBindPartnerStackInfo } from '@/service/use-billing'
|
||||
import { useBoolean } from 'ahooks'
|
||||
import Cookies from 'js-cookie'
|
||||
import { useSearchParams } from 'next/navigation'
|
||||
import { useCallback } from 'react'
|
||||
import { PARTNER_STACK_CONFIG } from '@/config'
|
||||
import { useBindPartnerStackInfo } from '@/service/use-billing'
|
||||
|
||||
const usePSInfo = () => {
|
||||
const searchParams = useSearchParams()
|
||||
@ -27,9 +27,9 @@ const usePSInfo = () => {
|
||||
const domain = globalThis.location.hostname.replace('cloud', '')
|
||||
|
||||
const saveOrUpdate = useCallback(() => {
|
||||
if(!psPartnerKey || !psClickId)
|
||||
if (!psPartnerKey || !psClickId)
|
||||
return
|
||||
if(!isPSChanged)
|
||||
if (!isPSChanged)
|
||||
return
|
||||
Cookies.set(PARTNER_STACK_CONFIG.cookieName, JSON.stringify({
|
||||
partnerKey: psPartnerKey,
|
||||
@ -52,7 +52,7 @@ const usePSInfo = () => {
|
||||
shouldRemoveCookie = true
|
||||
}
|
||||
catch (error: unknown) {
|
||||
if((error as { status: number })?.status === 400)
|
||||
if ((error as { status: number })?.status === 400)
|
||||
shouldRemoveCookie = true
|
||||
}
|
||||
if (shouldRemoveCookie)
|
||||
|
||||
Reference in New Issue
Block a user