Skip to content

Feature/adding gig board#9

Open
pranav-singhal wants to merge 10 commits intoTalentLayer-Labs:mainfrom
pranav-singhal:feature/adding-gig-board
Open

Feature/adding gig board#9
pranav-singhal wants to merge 10 commits intoTalentLayer-Labs:mainfrom
pranav-singhal:feature/adding-gig-board

Conversation

@pranav-singhal
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Aug 17, 2023

@pranav-singhal is attempting to deploy a commit to the TalentLayer Team on Vercel.

A member of the Team first needs to authorize it.

import { ServiceStatusEnum } from '../../types';
import ServiceItem from '../ServiceItem';

interface IGigBoardProps {
Copy link
Contributor

@0xRomain 0xRomain Aug 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The semantics used for the end user and the one used in the code is different. In the code, we use a more global term used also in smart contract: Service
Also I think Board is not as clear for the code and can be confusing as we also have a page which list services.
So globally, pages and components may be named: ServicesEmbed, ServicesEmbedSettings, create-services-embed

onSuccess={navigateToGigBoardSettings}
onChange={(event: ILiveServiceContent) => {
// TODO: move this to an async function expression
if (event.rateAmount) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best practices and perf improvement:
here a new instance of your function is created on every rerender, better to use useCallback

import StarterKitContext from '../../../context/starterKit';
import { ServiceStatusEnum } from '../../../types';

const BASE_URL = 'http://localhost:3000';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really a good practice to have that here.

  • Solution 1: get the base URL dynamically with window.location
  • Solution 2: put this in a .env
    Sol 1 seems good to me here

))}
</Field>
</label>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We gonna add two new fields here please. Two colors picker, for primary and secondary colors

btoa(process.env.NEXT_PUBLIC_INFURA_ID + ':' + process.env.NEXT_PUBLIC_INFURA_SECRET);
ipfs = create({
url: 'https://infura-ipfs.io:5001/api/v0',
url: process.env.NEXT_PUBLIC_IPFS_BASE_URL,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will prevent IPFS to work, the public URL to read is not the same as the one to write

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see
But when I was running it locally, I was able to write/read successfully

return <div>Loading</div>;
}
if (services.length === 0) {
return <div>You have no services</div>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no gigs

return `<iframe src="${gigboardUrl}" width="600" height="400"></iframe>`;
};

const GigBoardSettings = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the name of the file and main component must be similar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants