feat(editor): ✨ Custom icon on typebot
This commit is contained in:
@ -37,6 +37,7 @@ export const parsePublicTypebotToTypebot = (
|
||||
publishedTypebotId: typebot.id,
|
||||
folderId: existingTypebot.folderId,
|
||||
ownerId: existingTypebot.ownerId,
|
||||
icon: existingTypebot.icon,
|
||||
})
|
||||
|
||||
export const createPublishedTypebot = async (typebot: PublicTypebot) =>
|
||||
|
@ -56,7 +56,7 @@ import { Plan, User } from 'db'
|
||||
|
||||
export type TypebotInDashboard = Pick<
|
||||
Typebot,
|
||||
'id' | 'name' | 'publishedTypebotId'
|
||||
'id' | 'name' | 'publishedTypebotId' | 'icon'
|
||||
>
|
||||
export const useTypebots = ({
|
||||
folderId,
|
||||
@ -351,6 +351,7 @@ export const parseNewTypebot = ({
|
||||
| 'publishedTypebotId'
|
||||
| 'publicId'
|
||||
| 'customDomain'
|
||||
| 'icon'
|
||||
> => {
|
||||
const startBlockId = cuid()
|
||||
const startStepId = cuid()
|
||||
|
@ -30,7 +30,12 @@ export const useSharedTypebots = ({
|
||||
onError: (error: Error) => void
|
||||
}) => {
|
||||
const { data, error, mutate } = useSWR<
|
||||
{ sharedTypebots: Pick<Typebot, 'name' | 'id' | 'publishedTypebotId'>[] },
|
||||
{
|
||||
sharedTypebots: Pick<
|
||||
Typebot,
|
||||
'name' | 'id' | 'publishedTypebotId' | 'icon'
|
||||
>[]
|
||||
},
|
||||
Error
|
||||
>(userId ? `/api/users/${userId}/sharedTypebots` : null, fetcher)
|
||||
if (error) onError(error)
|
||||
|
Reference in New Issue
Block a user