-
Notifications
You must be signed in to change notification settings - Fork 8
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
#3060-Edit Organization Logo #3065
#3060-Edit Organization Logo #3065
Conversation
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.
looks good other than just not showing anything when there isnt an image
src/frontend/public/default-logo.png
Outdated
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.
this should not be here
return await downloadGoogleImage(fileId); | ||
} catch { | ||
// return default logo if fileId was not found | ||
return await getDefaultImageData(); |
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.
no lets not do this. return undefined if it. doesnt exist
@@ -1,5 +1,5 @@ | |||
-- AlterTable | |||
ALTER TABLE "Organization" ADD COLUMN "logoImage" TEXT; | |||
ALTER TABLE "Organization" ADD COLUMN "logoImageId" TEXT; |
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.
ensure at some point you consolidate all of your migration files to just one migration called home-page-redesign
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.
looking good
|
||
const EditLogo = () => { | ||
const { data: organization, isLoading: organizationIsLoading } = useCurrentOrganization(); | ||
const { data: imageData, isLoading: imageDataIsLoading } = useOrganizationLogo(); |
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.
add error handling for these queries. Ensure all useQueries added have proper error handling.
|
||
const onSubmit = async (logoInput: EditLogoInput) => { | ||
try { | ||
console.log(logoInput); |
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.
remove console
try { | ||
console.log(logoInput); | ||
if (!logoInput.logoImage) { | ||
handleClose(); |
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.
we should probably toast why were closing
<NERFailButton sx={{ mx: 1 }} form={'edit-organization-logo'} onClick={onHideWrapper}> | ||
Cancel | ||
</NERFailButton> | ||
<NERSuccessButton |
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.
this is weird. were gonna be submitting twice. Wee should remove this onclick prop and delete the onSubmitWrapper.
Changes
Added an admin tool to update the organization's logo
Notes
Screenshots
*Video in slack thread
Checklist
It can be helpful to check the
Checks
andFiles changed
tabs.Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.
yarn.lock
changes (unless dependencies have changed)Closes #3060