-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat(mini-mode): comments input #971
Conversation
sachin-into
commented
Feb 16, 2024
- modified useIpfs hook to upload files in mini mode
- created MiniCommentInput (similar to NewsfeedInput but for comment only); has different file browsing packages supporting mobile for image/video/audio selection
created MiniCommentInput (similar to NewsfeedInput but for comment only); has different file browsing packages supporting mobile for image/video/audio selection
✅ Deploy Preview for teritori-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for testitori ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…ni-comments # Conflicts: # package.json # packages/hooks/useIpfs.ts # packages/screens/Mini/Feed/components/detailView/MiniArticlePostDetails.tsx # packages/screens/Mini/Feed/components/detailView/MiniDefaultPostDetails.tsx # yarn.lock
…, SelectAudioVideo and SelectPicture
…tori-dapp into feat/mini-comments
packages/hooks/useIpfs.ts
Outdated
@@ -22,6 +24,7 @@ interface IPFSUploadProgress { | |||
export interface PinataFileProps { | |||
file: LocalFileData; | |||
pinataJWTKey: string; | |||
mode?: AppMode; |
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.
I don't understand why this hook need to be aware of the app mode
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.
While uploading file from app instead of converting selected file to File type similar to WEB, I just used file URL to create formData and upload it to pinata. So, just to check if we are uploading from web or app I added that appmode
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.
okay, app mode is not related to mobile or desktop, it's the mode of the ui.
an user could use mini-mode on desktop, btw mini means minimalist, not small screen
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.
use Platform.OS in here directly if possible and remove the new prop
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.
ok, I didn't know that. Will do
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.
I replaced app mode check with Platform.OS check
packages/hooks/useIpfs.ts
Outdated
}: PinataFileProps): Promise<string | undefined> => { | ||
try { | ||
const formData = new FormData(); | ||
formData.append("file", file.file); | ||
if (mode === "mini") { | ||
//@ts-expect-error: description instead of adding file when adding url in formdata file upload to pinata |
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.
I don't understand the comment
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.
As I state in above comment, to create formData for app side, I did it in that way.