Skip to content

How to add dependency to client handler? #60

Open
@FreePhoenix888

Description

@FreePhoenix888

We have added dependency this way: main...LiKissDmd:deepcase:main

Here is client handler code:

async ({ deep, require }) => {
  const React = require('react');
  const { Box,Button } = require('@chakra-ui/react');
  const { generateMessages, getAllCoolOrders } = require("@likissdmd/warframe-market-prime-trash-buyer")

  return ({ fillSize, style, link }) => {
    function buttonClickHandler(){
      const allCoolOrders = await getAllCoolOrders()
    const messages = generateMessages(allCoolOrders)
    }
    return <Box
        style={{ width: 300, height: 300, ...style }}
        bg={'bgColor'}
        color={'text'}
        borderColor={'borderColor'}
        borderWidth='thin'
        borderWidth='1px' borderRadius='lg'
        padding={1}
    >
<Button onClick={buttonClickHandler}>
Generate Messages
</Button>
    </Box>
  }
}

Nothing is showed in the preview. I think this is related to import. When we were trying to import this package in async docker handler (not client) we had error like "You are importing es module by using require, use async import instead (await import)) and we fixed that by using await import instead and it was working. await import here does not work

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions