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

fixed typos #268

Merged
merged 1 commit into from
Jul 1, 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
2 changes: 1 addition & 1 deletion apps/mobile/components/bookmarks/UpdatingBookmarkList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function UpdatingBookmarkList({
<BookmarkList
bookmarks={data.pages
.flatMap((p) => p.bookmarks)
.filter((b) => b.content.type != BookmarkTypes.UNKNWON)}
.filter((b) => b.content.type != BookmarkTypes.UNKNOWN)}
header={header}
onRefresh={onRefresh}
fetchNextPage={fetchNextPage}
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/types/bookmarks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const enum BookmarkTypes {
LINK = "link",
TEXT = "text",
ASSET = "asset",
UNKNWON = "unknown",
UNKNOWN = "unknown",
}

export const zBookmarkedLinkSchema = z.object({
Expand Down Expand Up @@ -45,7 +45,7 @@ export const zBookmarkContentSchema = z.discriminatedUnion("type", [
zBookmarkedLinkSchema,
zBookmarkedTextSchema,
zBookmarkedAssetSchema,
z.object({ type: z.literal(BookmarkTypes.UNKNWON) }),
z.object({ type: z.literal(BookmarkTypes.UNKNOWN) }),
]);
export type ZBookmarkContent = z.infer<typeof zBookmarkContentSchema>;

Expand Down
6 changes: 3 additions & 3 deletions packages/trpc/routers/bookmarks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function toZodSchema(bookmark: BookmarkQueryReturnType): ZBookmark {
const { tagsOnBookmarks, link, text, asset, assets, ...rest } = bookmark;

let content: ZBookmarkContent = {
type: BookmarkTypes.UNKNWON,
type: BookmarkTypes.UNKNOWN,
};
switch (bookmark.type) {
case BookmarkTypes.LINK:
Expand Down Expand Up @@ -230,7 +230,7 @@ export const bookmarksAppRouter = router({
return { ...alreadyExists, alreadyExists: true };
}
}
if (input.type == BookmarkTypes.UNKNWON) {
if (input.type == BookmarkTypes.UNKNOWN) {
throw new TRPCError({ code: "BAD_REQUEST" });
}
const bookmark = await ctx.db.transaction(async (tx) => {
Expand Down Expand Up @@ -603,7 +603,7 @@ export const bookmarksAppRouter = router({

if (
row.bookmarkTags &&
// Duplicates may accur because of the join, so we need to make sure we're not adding the same tag twice
// Duplicates may occur because of the join, so we need to make sure we're not adding the same tag twice
!acc[bookmarkId].tags.some((t) => t.id == row.bookmarkTags!.id)
) {
invariant(
Expand Down
Loading