-
Notifications
You must be signed in to change notification settings - Fork 1
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
OUT-46 Integrate APIs #11
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
if (!clientId) { | ||
respondError('Missing client Id', 422); | ||
} | ||
const copilotClient = new CopilotAPI(z.string().parse(token)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is not inside try/catch?
src/components/customFieldAccessTable/CustomFieldAccessTable.tsx
Outdated
Show resolved
Hide resolved
src/app/views/Sidebar.tsx
Outdated
|
||
export const Sidebar = () => { | ||
const appState = useAppState(); | ||
|
||
const handleMutableSettings = (selected: boolean, type: string) => { | ||
if (!selected) { | ||
if (type === 'profile_settings') { | ||
if (type === ProfileLinks.ProfileSetting) { | ||
const newSettings = appState?.mutableSettings.filter((el: string) => el !== type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the underlying logic for both these conditions are same, why the type check at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d0ed649 commit removes unnecessary if/else comparision @sajjanstha
src/app/views/Sidebar.tsx
Outdated
const newSettings = appState?.mutableSettings.filter((el: string) => el !== type); | ||
appState?.setAppState((prev) => ({ ...prev, mutableSettings: newSettings })); | ||
} | ||
} | ||
if (selected) { | ||
if (type === 'profile_settings') { | ||
if (type === ProfileLinks.ProfileSetting) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d0ed649 commit resolves this @sajjanstha
I updated the code to use server action in this commit - b6d7909, but there was an error while revalidateTag only in the production. I am not sure why. So for now I have reverted the server actions back. @saugatmaharjan |
leaving server action to do in another branch |
Task/Ticket
Integrate APIs
The main changes are