Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/adding gig board #9

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

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

@@ -9,7 +12,7 @@ export const postToIPFS = async (data: any): Promise<string> => {
'Basic ' +
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