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

Fix more typescript errors #14

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
import mime from "mime";
import type { WalletFile } from "@/types/WalletFile";
import { makeApiRequest } from "./apiRequest";

interface FileObject {
Expand Down
1 change: 1 addition & 0 deletions app/(tabs)/home/[fileName].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { FontAwesome6 } from "@expo/vector-icons";
import { Colors } from "@/constants/Colors";
import VcCard from "@/components/files/VcCard";
import BottomModal from "@/components/files/BottomModal";
import type { WalletFile } from "@/types/WalletFile";

interface FileDetailProps {
file: WalletFile;
Expand Down
1 change: 1 addition & 0 deletions app/(tabs)/home/download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { postFile } from "@/api/files";
import { FontAwesome6 } from "@expo/vector-icons";
import IconResourceName from "@/components/common/IconResourceName";
import { RDF_CONTENT_TYPE } from "@/utils/constants";
import type { WalletFile } from "@/types/WalletFile";

interface FileDetailProps {
file: WalletFile;
Expand Down
1 change: 1 addition & 0 deletions app/(tabs)/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { fetchFiles } from "@/api/files";
import FileList from "@/components/files/FileList";
import useRefreshOnFocus from "@/hooks/useRefreshOnFocus";
import { Colors } from "@/constants/Colors";
import type { WalletFile } from "@/types/WalletFile";

const HomeScreen = () => {
const { data, isLoading, isFetching, refetch } = useQuery<WalletFile[]>({
Expand Down
6 changes: 4 additions & 2 deletions app/(tabs)/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@ export default function Profile() {
borderRadius={50}
/>
) : (
<AccessSolid style={styles.profileUri} borderRadius={50} />
<AccessSolid style={styles.profileUri} />
)}
<View style={styles.profileDetail}>
<ThemedText style={styles.profileName}>
{name || webId ? formatResourceName(webId, false, webId) : null}
{name || webId
? formatResourceName(name || webId || "", false, webId)
: null}
</ThemedText>
<ThemedText fontWeight="light" style={styles.profileWebId}>
{webId}
Expand Down
1 change: 1 addition & 0 deletions components/files/BottomModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import * as FileSystem from "expo-file-system";
import QRCode from "react-native-qrcode-svg";
import { formatResourceName } from "@/utils/fileUtils";
import type { UserInfo } from "@/constants/user";
import type { WalletFile } from "@/types/WalletFile";
import { ThemedText } from "../ThemedText";
import ConfirmModal from "../common/ConfirmModal";

Expand Down
1 change: 1 addition & 0 deletions components/files/FileList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { faEllipsis } from "@fortawesome/free-solid-svg-icons/faEllipsis";
import { useRouter } from "expo-router";
import { useIsMutating } from "@tanstack/react-query";
import Loading from "@/components/LoadingButton";
import type { WalletFile } from "@/types/WalletFile";
import BottomModal from "./BottomModal";
import { ThemedText } from "../ThemedText";

Expand Down
1 change: 1 addition & 0 deletions utils/fileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { faImage } from "@fortawesome/free-solid-svg-icons/faImage";
import { faIdCard } from "@fortawesome/free-solid-svg-icons/faIdCard";
import { faWallet } from "@fortawesome/free-solid-svg-icons/faWallet";
import { AccessRequestMode } from "@/types/enums";
import type { WalletFile } from "@/types/WalletFile";

function capitalize(word: string): string {
return word.charAt(0).toUpperCase() + word.slice(1);
Expand Down