From e9b7c499037cceecf7aced866f1714d6f4bb580d Mon Sep 17 00:00:00 2001 From: WaDadidou Date: Thu, 17 Oct 2024 21:00:59 -0400 Subject: [PATCH] fix: arrange fileUploader arborescence, add small features --- .../FilePreview/EditableAudioPreview.tsx | 2 +- .../fileUploader/FileUploader.web.tsx | 228 ------------ .../FileUploaderSmall.type.ts | 4 + .../FileUploaderSmall.web.tsx | 329 ++++++++++-------- .../fileUploader/FileUploader.tsx | 33 +- .../fileUploader/FileUploader.type.ts | 3 +- .../inputs/fileUploader/FileUploader.web.tsx | 236 +++++++++++++ .../{ => inputs}/fileUploader/formatFile.ts | 8 +- .../{ => inputs}/fileUploader/index.ts | 0 .../music/UploadMusicModal/UploadTrack.tsx | 2 +- .../socialFeed/NewsFeed/NewsFeedInput.tsx | 2 +- .../socialFeed/RichText/RichText.web.tsx | 2 +- .../components/video/UploadVideoModal.tsx | 2 +- .../FeedNewArticle/FeedNewArticleScreen.tsx | 2 +- .../ShortPresentation.tsx | 2 +- .../mintUploader/mintUploader.web.tsx | 4 +- 16 files changed, 454 insertions(+), 405 deletions(-) delete mode 100644 packages/components/fileUploader/FileUploader.web.tsx rename packages/components/{ => inputs}/fileUploader/FileUploader.tsx (79%) rename packages/components/{ => inputs}/fileUploader/FileUploader.type.ts (85%) create mode 100644 packages/components/inputs/fileUploader/FileUploader.web.tsx rename packages/components/{ => inputs}/fileUploader/formatFile.ts (78%) rename packages/components/{ => inputs}/fileUploader/index.ts (100%) diff --git a/packages/components/FilePreview/EditableAudioPreview.tsx b/packages/components/FilePreview/EditableAudioPreview.tsx index 9d2909fc98..09baf409f4 100644 --- a/packages/components/FilePreview/EditableAudioPreview.tsx +++ b/packages/components/FilePreview/EditableAudioPreview.tsx @@ -26,7 +26,7 @@ import { LocalFileData } from "../../utils/types/files"; import { BrandText } from "../BrandText"; import { OptimizedImage } from "../OptimizedImage"; import { SVG } from "../SVG"; -import { FileUploader } from "../fileUploader"; +import { FileUploader } from "../inputs/fileUploader"; import { SelectPicture } from "../mini/SelectPicture"; interface AudioPreviewProps { diff --git a/packages/components/fileUploader/FileUploader.web.tsx b/packages/components/fileUploader/FileUploader.web.tsx deleted file mode 100644 index e121b56d69..0000000000 --- a/packages/components/fileUploader/FileUploader.web.tsx +++ /dev/null @@ -1,228 +0,0 @@ -import React, { FC, SyntheticEvent, useRef, useState } from "react"; -import { TouchableOpacity, View } from "react-native"; - -import { FileUploaderProps } from "./FileUploader.type"; -import { formatFile } from "./formatFile"; -import uploadSVG from "../../../assets/icons/upload.svg"; -import { useFeedbacks } from "../../context/FeedbacksProvider"; -import { - gradientColorBlue, - gradientColorDarkerBlue, - gradientColorTurquoise, - neutral17, - neutral77, - withAlpha, -} from "../../utils/style/colors"; -import { fontSemibold14 } from "../../utils/style/fonts"; -import { layout } from "../../utils/style/layout"; -import { BrandText } from "../BrandText"; -import { DeleteButton } from "../FilePreview/DeleteButton"; -import { SVG } from "../SVG"; -import { LegacyPrimaryBox } from "../boxes/LegacyPrimaryBox"; -import { GradientText } from "../gradientText"; -import { Label } from "../inputs/TextInputCustom"; - -export const FileUploader: FC = ({ - label, - style, - fileImageStyle, - onUpload, - // multiple is not used at true for now, needs to refactor in parents - multiple, - mimeTypes, - children, - maxUpload, - setIsLoading, -}) => { - const { setToastError } = useFeedbacks(); - const hiddenFileInput = useRef(null); - const [file, setFile] = useState(""); - - const handleFiles = async (files: File[]) => { - const _files = multiple ? files : [files[0]]; - let supportedFiles = [...files].filter((file) => - mimeTypes?.includes(file.type), - ); - - if (maxUpload && supportedFiles.length) { - supportedFiles = supportedFiles.slice(0, maxUpload); - } - - if (supportedFiles.length === 0) { - setToastError({ - title: "Unsupported file type.", - message: "Sorry we couldn't upload file.", - }); - return; - } else if (multiple && supportedFiles.length !== _files.length) { - setToastError({ - title: "Unsupported file type.", - message: "Sorry we couldn't upload some files at the moment.", - }); - } - if (!multiple) { - setFile(URL.createObjectURL(_files[0])); - } - - const formattedFiles = await Promise.all( - supportedFiles.map(async (file) => await formatFile(file)), - ); - - onUpload(formattedFiles); - }; - - const handleChange = async (event: SyntheticEvent) => { - setIsLoading?.(true); - const targetEvent = event.target as HTMLInputElement; - - if (targetEvent.files && targetEvent.files[0]) { - await handleFiles(targetEvent?.files as unknown as File[]); - } - setIsLoading?.(false); - }; - - const handleClick = () => { - hiddenFileInput?.current?.click?.(); - }; - - const dropHandler = async (ev: any) => { - setIsLoading?.(true); - ev.preventDefault(); - if (ev.dataTransfer.items) { - const files = [...ev.dataTransfer.items] - .filter((item: any) => item.kind === "file") - .map((item: any) => item.getAsFile()); - await handleFiles(files); - } else { - await handleFiles(ev.dataTransfer.files); - } - setIsLoading?.(false); - }; - - const dragOverHandler = (ev: SyntheticEvent) => { - ev.preventDefault(); - }; - - const InputComponent = ( - - ); - - if (children) { - return ( - <> - {children({ onPress: handleClick })} - {InputComponent} - - ); - } - - return ( - <> - - {!!label && } - -
- {file ? ( - <> - { - setFile(""); - onUpload([]); - }} - style={{ top: 12, right: 12 }} - /> - Uploaded file - - ) : ( - - - - - - - - Browse file - - - Or drag & drop here - - - - - - )} -
-
-
- {InputComponent} - - ); -}; diff --git a/packages/components/inputs/FileUploaderSmall/FileUploaderSmall.type.ts b/packages/components/inputs/FileUploaderSmall/FileUploaderSmall.type.ts index c0b28964e7..4e34f06d21 100644 --- a/packages/components/inputs/FileUploaderSmall/FileUploaderSmall.type.ts +++ b/packages/components/inputs/FileUploaderSmall/FileUploaderSmall.type.ts @@ -20,3 +20,7 @@ export interface FileUploaderSmallProps { onPressDelete?: () => void; disabled?: boolean; } + +export interface FileUploaderSmallHandle { + resetFiles: () => void; +} diff --git a/packages/components/inputs/FileUploaderSmall/FileUploaderSmall.web.tsx b/packages/components/inputs/FileUploaderSmall/FileUploaderSmall.web.tsx index a40451f0ec..6cda44ab67 100644 --- a/packages/components/inputs/FileUploaderSmall/FileUploaderSmall.web.tsx +++ b/packages/components/inputs/FileUploaderSmall/FileUploaderSmall.web.tsx @@ -1,7 +1,16 @@ -import React, { FC, SyntheticEvent, useRef, useState } from "react"; +import React, { + forwardRef, + SyntheticEvent, + useImperativeHandle, + useRef, + useState, +} from "react"; import { View } from "react-native"; -import { FileUploaderSmallProps } from "./FileUploaderSmall.type"; +import { + FileUploaderSmallHandle, + FileUploaderSmallProps, +} from "./FileUploaderSmall.type"; import { useFeedbacks } from "../../../context/FeedbacksProvider"; import { secondaryColor } from "../../../utils/style/colors"; import { fontSemibold14 } from "../../../utils/style/fonts"; @@ -10,173 +19,191 @@ import { BrandText } from "../../BrandText"; import { SVGorImageIcon } from "../../SVG/SVGorImageIcon"; import { PrimaryBox } from "../../boxes/PrimaryBox"; import { Label } from "../TextInputCustom"; +import { formatFile } from "../fileUploader/formatFile"; import addSVG from "@/assets/icons/add-circle.svg"; import filesSVG from "@/assets/icons/files.svg"; import { DeleteButton } from "@/components/FilePreview/DeleteButton"; import { OptimizedImage } from "@/components/OptimizedImage"; import { CustomPressable } from "@/components/buttons/CustomPressable"; -import { formatFile } from "@/components/fileUploader/formatFile"; import { SpacerRow } from "@/components/spacer"; import { pluralOrNot } from "@/utils/text"; import { LocalFileData } from "@/utils/types/files"; -export const FileUploaderSmall: FC = ({ - label, - style, - onUpload, - multiple, - mimeTypes, - maxUpload, - filesCount, - setIsLoading, - required, - boxStyle, - imageToShow, - onPressDelete, - disabled, -}) => { - const { setToast } = useFeedbacks(); - const hiddenFileInput = useRef(null); - const [hovered, setHovered] = useState(false); - const [addedFiles, setAddedFiles] = useState([]); +export const FileUploaderSmall = forwardRef< + FileUploaderSmallHandle, + FileUploaderSmallProps +>( + ( + { + label, + style, + onUpload, + multiple, + mimeTypes, + maxUpload, + filesCount, + setIsLoading, + required, + boxStyle, + imageToShow, + onPressDelete, + disabled, + }, + forwardRef, + ) => { + const { setToast } = useFeedbacks(); + const hiddenFileInputRef = useRef(null); + const [hovered, setHovered] = useState(false); + const [addedFiles, setAddedFiles] = useState([]); - const handleFiles = async (files: File[]) => { - const _files = multiple ? files : [files[0]]; - let supportedFiles = [...files].filter((file) => - mimeTypes?.includes(file.type), - ); - if (maxUpload && supportedFiles.length) { - supportedFiles = supportedFiles.slice(0, maxUpload); - } + useImperativeHandle(forwardRef, () => ({ + resetFiles: () => { + if (hiddenFileInputRef.current) { + hiddenFileInputRef.current.value = ""; + setAddedFiles([]); + } + }, + })); - if ( - supportedFiles.length === 0 || - (multiple && supportedFiles.length !== _files.length) - ) { - setToast({ - title: "Unsupported file type", - duration: 5000, - mode: "normal", - type: "error", - }); - return; - } - const formattedFiles = await Promise.all( - supportedFiles.map(async (file) => await formatFile(file)), - ); - setAddedFiles(formattedFiles); - onUpload(formattedFiles); - }; + const handleFiles = async (files: File[]) => { + const _files = multiple ? files : [files[0]]; + let supportedFiles = [...files].filter((file) => + mimeTypes?.includes(file.type), + ); + if (maxUpload && supportedFiles.length) { + supportedFiles = supportedFiles.slice(0, maxUpload); + } - const handleChange = async (event: SyntheticEvent) => { - setIsLoading?.(true); - const targetEvent = event.target as HTMLInputElement; + if ( + supportedFiles.length === 0 || + (multiple && supportedFiles.length !== _files.length) + ) { + setToast({ + title: "Unsupported file type", + duration: 5000, + mode: "normal", + type: "error", + }); + return; + } + const formattedFiles = await Promise.all( + supportedFiles.map(async (file) => await formatFile(file)), + ); + setAddedFiles(formattedFiles); + onUpload(formattedFiles); + }; - if (targetEvent.files && targetEvent.files[0]) { - await handleFiles(targetEvent?.files as unknown as File[]); - } - setIsLoading?.(false); - }; - const handleClick = () => { - hiddenFileInput?.current?.click?.(); - }; + const handleChange = async (event: SyntheticEvent) => { + setIsLoading?.(true); + const targetEvent = event.target as HTMLInputElement; - const InputComponent = ( - - ); + if (targetEvent.files && targetEvent.files[0]) { + await handleFiles(targetEvent?.files as unknown as File[]); + } + setIsLoading?.(false); + }; + const handleClick = () => { + hiddenFileInputRef?.current?.click?.(); + }; - return ( - setHovered(true)} - onHoverOut={() => setHovered(false)} - onPress={handleClick} - disabled={disabled} - > - {!!label && ( - - )} + const InputComponent = ( + + ); - {imageToShow ? ( - - {onPressDelete && ( - - )} - - - ) : ( - - - 0 ? filesSVG : addSVG} - iconSize={32} + return ( + setHovered(true)} + onHoverOut={() => setHovered(false)} + onPress={handleClick} + disabled={disabled} + > + {!!label && ( + + )} + + {imageToShow ? ( + + {onPressDelete && ( + + )} + - - - - {!multiple && filesCount && filesCount === addedFiles.length - ? addedFiles[0].file.name - : !multiple && !filesCount - ? "Select file" - : multiple && filesCount - ? filesCount + ` ${pluralOrNot("file", filesCount)} selected` - : multiple && !filesCount - ? "Select files" - : ""} - - - )} + + 0 ? filesSVG : addSVG} + iconSize={32} + /> + - {InputComponent} - - ); -}; + + + {!multiple && filesCount && filesCount === addedFiles.length + ? addedFiles[0].file.name + : !multiple && !filesCount + ? "Select file" + : multiple && filesCount + ? filesCount + + ` ${pluralOrNot("file", filesCount)} selected` + : multiple && !filesCount + ? "Select files" + : ""} + + + )} + + {InputComponent} + + ); + }, +); diff --git a/packages/components/fileUploader/FileUploader.tsx b/packages/components/inputs/fileUploader/FileUploader.tsx similarity index 79% rename from packages/components/fileUploader/FileUploader.tsx rename to packages/components/inputs/fileUploader/FileUploader.tsx index 6689f66e82..6d399ce211 100644 --- a/packages/components/fileUploader/FileUploader.tsx +++ b/packages/components/inputs/fileUploader/FileUploader.tsx @@ -2,7 +2,6 @@ import React, { useState } from "react"; import { View, Image, TouchableOpacity } from "react-native"; import { FileUploaderProps } from "./FileUploader.type"; -import uploadSVG from "../../../assets/icons/upload.svg"; import { gradientColorBlue, gradientColorDarkerBlue, @@ -10,24 +9,34 @@ import { neutral17, neutral77, withAlpha, -} from "../../utils/style/colors"; -import { fontSemibold14 } from "../../utils/style/fonts"; -import { layout } from "../../utils/style/layout"; -import { BrandText } from "../BrandText"; -import { DeleteButton } from "../FilePreview/DeleteButton"; -import { SVG } from "../SVG"; -import { LegacyPrimaryBox } from "../boxes/LegacyPrimaryBox"; -import { GradientText } from "../gradientText"; -import { Label } from "../inputs/TextInputCustom"; +} from "../../../utils/style/colors"; +import { fontSemibold14 } from "../../../utils/style/fonts"; +import { layout } from "../../../utils/style/layout"; +import { BrandText } from "../../BrandText"; +import { DeleteButton } from "../../FilePreview/DeleteButton"; +import { SVG } from "../../SVG"; +import { LegacyPrimaryBox } from "../../boxes/LegacyPrimaryBox"; +import { GradientText } from "../../gradientText"; +import { Label } from "../TextInputCustom"; + +import uploadSVG from "@/assets/icons/upload.svg"; //FIXME: Doesn't work for now => Only the .web version is used -export const FileUploader: React.FC = ({ label, style }) => { +export const FileUploader: React.FC = ({ + label, + style, + required, +}) => { const [files, setFiles] = useState([]); return ( - {!!label && } + {!!label && ( + + )} void }) => React.ReactNode; maxUpload?: number; setIsLoading?: (value: boolean) => void; + required?: boolean; } diff --git a/packages/components/inputs/fileUploader/FileUploader.web.tsx b/packages/components/inputs/fileUploader/FileUploader.web.tsx new file mode 100644 index 0000000000..76263b68e4 --- /dev/null +++ b/packages/components/inputs/fileUploader/FileUploader.web.tsx @@ -0,0 +1,236 @@ +import React, { FC, SyntheticEvent, useRef, useState } from "react"; +import { View } from "react-native"; + +import { FileUploaderProps } from "./FileUploader.type"; +import { formatFile } from "./formatFile"; +import { useFeedbacks } from "../../../context/FeedbacksProvider"; +import { + neutral17, + neutral77, + secondaryColor, +} from "../../../utils/style/colors"; +import { fontSemibold14 } from "../../../utils/style/fonts"; +import { layout } from "../../../utils/style/layout"; +import { BrandText } from "../../BrandText"; +import { DeleteButton } from "../../FilePreview/DeleteButton"; +import { SVG } from "../../SVG"; +import { GradientText } from "../../gradientText"; +import { Label } from "../TextInputCustom"; + +import uploadSVG from "@/assets/icons/upload.svg"; +import { PrimaryBox } from "@/components/boxes/PrimaryBox"; +import { CustomPressable } from "@/components/buttons/CustomPressable"; + +export const FileUploader: FC = ({ + label, + style, + fileImageStyle, + onUpload, + // multiple is not used at true for now, needs to refactor in parents + multiple, + mimeTypes, + children, + maxUpload, + setIsLoading, + required, +}) => { + const { setToast } = useFeedbacks(); + const hiddenFileInput = useRef(null); + const [file, setFile] = useState(""); + const [hovered, setHovered] = useState(false); + + const handleFiles = async (files: File[]) => { + const _files = multiple ? files : [files[0]]; + let supportedFiles = [...files].filter((file) => + mimeTypes?.includes(file.type), + ); + + if (maxUpload && supportedFiles.length) { + supportedFiles = supportedFiles.slice(0, maxUpload); + } + + if ( + supportedFiles.length === 0 || + (multiple && supportedFiles.length !== _files.length) + ) { + setToast({ + title: "Unsupported file type", + duration: 5000, + mode: "normal", + type: "error", + }); + return; + } + if (!multiple) { + setFile(URL.createObjectURL(_files[0])); + } + + const formattedFiles = await Promise.all( + supportedFiles.map(async (file) => await formatFile(file)), + ); + + onUpload(formattedFiles); + }; + + const handleChange = async (event: SyntheticEvent) => { + setIsLoading?.(true); + const targetEvent = event.target as HTMLInputElement; + + if (targetEvent.files && targetEvent.files[0]) { + await handleFiles(targetEvent?.files as unknown as File[]); + } + setIsLoading?.(false); + }; + + const handleClick = () => { + hiddenFileInput?.current?.click?.(); + }; + + const dropHandler = async (ev: any) => { + setIsLoading?.(true); + ev.preventDefault(); + if (ev.dataTransfer.items) { + const files = [...ev.dataTransfer.items] + .filter((item: any) => item.kind === "file") + .map((item: any) => item.getAsFile()); + await handleFiles(files); + } else { + await handleFiles(ev.dataTransfer.files); + } + setIsLoading?.(false); + }; + + const dragOverHandler = (ev: SyntheticEvent) => { + ev.preventDefault(); + }; + + const InputComponent = ( + + ); + + if (children) { + return ( + <> + {children({ onPress: handleClick })} + {InputComponent} + + ); + } + + return ( + <> + setHovered(true)} + onHoverOut={() => setHovered(false)} + onPress={handleClick} + > + {!!label && ( + + )} +
+ {file ? ( + <> + { + setFile(""); + onUpload([]); + }} + style={{ top: 12, right: 12 }} + /> + Uploaded file + + ) : ( + + + + + + + + Browse file + + + Or drag & drop here + + + + + + )} +
+
+ {InputComponent} + + ); +}; diff --git a/packages/components/fileUploader/formatFile.ts b/packages/components/inputs/fileUploader/formatFile.ts similarity index 78% rename from packages/components/fileUploader/formatFile.ts rename to packages/components/inputs/fileUploader/formatFile.ts index 449bff02fb..ae50f50375 100644 --- a/packages/components/fileUploader/formatFile.ts +++ b/packages/components/inputs/fileUploader/formatFile.ts @@ -1,11 +1,11 @@ +import { getAudioData } from "../../../utils/audio"; import { AUDIO_MIME_TYPES, IMAGE_MIME_TYPES, VIDEO_MIME_TYPES, -} from "./../../utils/mime"; -import { getAudioData } from "../../utils/audio"; -import { FileType, LocalFileData } from "../../utils/types/files"; -import { getVideoData } from "../../utils/video"; +} from "../../../utils/mime"; +import { FileType, LocalFileData } from "../../../utils/types/files"; +import { getVideoData } from "../../../utils/video"; export const formatFile = async (file: File): Promise => { let fileType: FileType = "file"; diff --git a/packages/components/fileUploader/index.ts b/packages/components/inputs/fileUploader/index.ts similarity index 100% rename from packages/components/fileUploader/index.ts rename to packages/components/inputs/fileUploader/index.ts diff --git a/packages/components/music/UploadMusicModal/UploadTrack.tsx b/packages/components/music/UploadMusicModal/UploadTrack.tsx index c98a7cc2aa..5402837b9e 100644 --- a/packages/components/music/UploadMusicModal/UploadTrack.tsx +++ b/packages/components/music/UploadMusicModal/UploadTrack.tsx @@ -38,8 +38,8 @@ import { BrandText } from "../../BrandText"; import { EditableAudioPreview } from "../../FilePreview/EditableAudioPreview"; import { SVG } from "../../SVG"; import { PrimaryButton } from "../../buttons/PrimaryButton"; -import { FileUploader } from "../../fileUploader"; import { TextInputCustom } from "../../inputs/TextInputCustom"; +import { FileUploader } from "../../inputs/fileUploader"; import { FeedPostingProgressBar } from "../../loaders/FeedPostingProgressBar"; import { FeedFeeText } from "../../socialFeed/FeedFeeText"; import { SpacerColumn, SpacerRow } from "../../spacer"; diff --git a/packages/components/socialFeed/NewsFeed/NewsFeedInput.tsx b/packages/components/socialFeed/NewsFeed/NewsFeedInput.tsx index 62ebccee09..99288b0254 100644 --- a/packages/components/socialFeed/NewsFeed/NewsFeedInput.tsx +++ b/packages/components/socialFeed/NewsFeed/NewsFeedInput.tsx @@ -23,7 +23,7 @@ import { OmniLink } from "../../OmniLink"; import { SVG } from "../../SVG"; import { PrimaryButton } from "../../buttons/PrimaryButton"; import { SecondaryButtonOutline } from "../../buttons/SecondaryButtonOutline"; -import { FileUploader } from "../../fileUploader"; +import { FileUploader } from "../../inputs/fileUploader"; import { FeedPostingProgressBar } from "../../loaders/FeedPostingProgressBar"; import { SpacerColumn } from "../../spacer"; import { EmojiSelector } from "../EmojiSelector"; diff --git a/packages/components/socialFeed/RichText/RichText.web.tsx b/packages/components/socialFeed/RichText/RichText.web.tsx index 3f3603f87f..a16c3dd83f 100644 --- a/packages/components/socialFeed/RichText/RichText.web.tsx +++ b/packages/components/socialFeed/RichText/RichText.web.tsx @@ -83,7 +83,7 @@ import { AudioView } from "../../FilePreview/AudioView"; import { EditableAudioPreview } from "../../FilePreview/EditableAudioPreview"; import { IconBox } from "../../IconBox"; import { PrimaryButton } from "../../buttons/PrimaryButton"; -import { FileUploader } from "../../fileUploader"; +import { FileUploader } from "../../inputs/fileUploader"; import { SpacerColumn, SpacerRow } from "../../spacer"; import { EmojiSelector } from "../EmojiSelector"; import { GIFSelector } from "../GIFSelector"; diff --git a/packages/components/video/UploadVideoModal.tsx b/packages/components/video/UploadVideoModal.tsx index 406414286c..3690abd5a0 100644 --- a/packages/components/video/UploadVideoModal.tsx +++ b/packages/components/video/UploadVideoModal.tsx @@ -44,8 +44,8 @@ import { OptimizedImage } from "../OptimizedImage"; import { SVG } from "../SVG"; import { CustomPressable } from "../buttons/CustomPressable"; import { PrimaryButton } from "../buttons/PrimaryButton"; -import { FileUploader } from "../fileUploader"; import { TextInputCustom } from "../inputs/TextInputCustom"; +import { FileUploader } from "../inputs/fileUploader"; import { FeedPostingProgressBar } from "../loaders/FeedPostingProgressBar"; import { SelectAudioVideo } from "../mini/SelectAudioVideo"; import { SelectPicture } from "../mini/SelectPicture"; diff --git a/packages/screens/FeedNewArticle/FeedNewArticleScreen.tsx b/packages/screens/FeedNewArticle/FeedNewArticleScreen.tsx index 5379e54f53..c7e5e8dc04 100644 --- a/packages/screens/FeedNewArticle/FeedNewArticleScreen.tsx +++ b/packages/screens/FeedNewArticle/FeedNewArticleScreen.tsx @@ -11,8 +11,8 @@ import { SVG } from "@/components/SVG"; import { ScreenContainer } from "@/components/ScreenContainer"; import { WalletStatusBox } from "@/components/WalletStatusBox"; import { TertiaryBox } from "@/components/boxes/TertiaryBox"; -import { FileUploader } from "@/components/fileUploader"; import { Label, TextInputCustom } from "@/components/inputs/TextInputCustom"; +import { FileUploader } from "@/components/inputs/fileUploader"; import { FeedPostingProgressBar } from "@/components/loaders/FeedPostingProgressBar"; import { RichText } from "@/components/socialFeed/RichText"; import { PublishValues } from "@/components/socialFeed/RichText/RichText.type"; diff --git a/packages/screens/Projects/ProjectsMakeRequestScreen/ShortPresentation.tsx b/packages/screens/Projects/ProjectsMakeRequestScreen/ShortPresentation.tsx index 102e6d8a61..635ccb565d 100644 --- a/packages/screens/Projects/ProjectsMakeRequestScreen/ShortPresentation.tsx +++ b/packages/screens/Projects/ProjectsMakeRequestScreen/ShortPresentation.tsx @@ -7,9 +7,9 @@ import { MakeRequestFooter } from "./Footer"; import addSVG from "../../../../assets/icons/add.svg"; import { BrandText } from "../../../components/BrandText"; import { PrimaryButtonOutline } from "../../../components/buttons/PrimaryButtonOutline"; -import { FileUploader } from "../../../components/fileUploader"; import { RoundedGradientImage } from "../../../components/images/RoundedGradientImage"; import { TextInputCustom } from "../../../components/inputs/TextInputCustom"; +import { FileUploader } from "../../../components/inputs/fileUploader"; import { SpacerColumn } from "../../../components/spacer"; import { useNameSearch } from "../../../hooks/search/useNameSearch"; import { useSelectedNetworkId } from "../../../hooks/useSelectedNetwork"; diff --git a/packages/screens/UserPublicProfile/components/mintUploader/mintUploader.web.tsx b/packages/screens/UserPublicProfile/components/mintUploader/mintUploader.web.tsx index 1468f83e0a..272b3f8ec7 100644 --- a/packages/screens/UserPublicProfile/components/mintUploader/mintUploader.web.tsx +++ b/packages/screens/UserPublicProfile/components/mintUploader/mintUploader.web.tsx @@ -9,8 +9,8 @@ import { DeleteButton } from "@/components/FilePreview/DeleteButton"; import { OptimizedImage } from "@/components/OptimizedImage"; import { SVG } from "@/components/SVG"; import { PrimaryBox } from "@/components/boxes/PrimaryBox"; -import { FileUploaderProps } from "@/components/fileUploader/FileUploader.type"; -import { formatFile } from "@/components/fileUploader/formatFile"; +import { FileUploaderProps } from "@/components/inputs/fileUploader/FileUploader.type"; +import { formatFile } from "@/components/inputs/fileUploader/formatFile"; import { AnimatedLoader } from "@/components/loaders/AnimatedLoader"; import { SpacerColumn } from "@/components/spacer"; import { useFeedbacks } from "@/context/FeedbacksProvider";