Hārūn | هارون
Hārūn | هارون
Explore posts from servers
VVALORANT
Created by Hārūn | هارون on 6/29/2024 in #community-help
Resolution changing when starting Val
Hi there, every time I start Valorant my resolution changes to 1024x768, my graphics drivers are updated and I tried everything I could, the only way to play on native (1920x1080) is going to windows settings and changing res and opening Val, otherwise my res defaults to 1024x768, does anyone know any fix to this?
3 replies
CCConvex Community
Created by Hārūn | هارون on 2/13/2024 in #support-community
Adding tags
Hey there, I'm trying to make tags for my project, basically every post has tags and then you can filter through those tags which will show all posts with that tag. Though every time I try and filter through it I get nothing back, It's probably a Syntax issue but I was wondering if I could check if an array includes something ? Here's my code:
schema.ts:
posts: defineTable({
title: v.string(),
userId: v.string(),
image: v.string(),
profileImage: v.optional(v.string()),
description: v.string(),
author: v.optional(v.string()),
likes: v.number(),
likeIds: v.optional(v.array(v.string())),
tags: v.array(v.string())
}).index("by_tagName", ["tags"]),
schema.ts:
posts: defineTable({
title: v.string(),
userId: v.string(),
image: v.string(),
profileImage: v.optional(v.string()),
description: v.string(),
author: v.optional(v.string()),
likes: v.number(),
likeIds: v.optional(v.array(v.string())),
tags: v.array(v.string())
}).index("by_tagName", ["tags"]),
posts.ts
export const postsByTagName = query({
args: {
tagName: v.string(),
paginationOpts: paginationOptsValidator
},
handler: async (ctx, args) => {
return await ctx.db
.query("posts")
.filter((q) => q.eq(q.field("tags"), args.tagName))
.order("desc")
.paginate(args.paginationOpts);
},
});
posts.ts
export const postsByTagName = query({
args: {
tagName: v.string(),
paginationOpts: paginationOptsValidator
},
handler: async (ctx, args) => {
return await ctx.db
.query("posts")
.filter((q) => q.eq(q.field("tags"), args.tagName))
.order("desc")
.paginate(args.paginationOpts);
},
});
I'm using Next 14 btw and this is the code for it:
const params = useParams<{ tagName: string }>();
const tagName = params.tagName;

const {
results: blogs,
status,
loadMore,
isLoading,
} = usePaginatedQuery(
api.posts.tagPagePosts,
{ tagName },
{ initialNumItems: 10 }
);
const params = useParams<{ tagName: string }>();
const tagName = params.tagName;

const {
results: blogs,
status,
loadMore,
isLoading,
} = usePaginatedQuery(
api.posts.tagPagePosts,
{ tagName },
{ initialNumItems: 10 }
);
So I'm wondering if there are any solutions to this. Thanks in advance and I apologize if this isn't the right channel for this.
27 replies
CCConvex Community
Created by Hārūn | هارون on 2/4/2024 in #support-community
Weird bugs
Hi there, I'm following a tutorial and did everything the same (https://www.youtube.com/watch?v=Vjtn9pWAZDI&t=612s&ab_channel=WebDevCody) my issue is though I get this error everytime I try to run npx convex dev: X [ERROR] Could not resolve "fs" node_modules/next/dist/compiled/gzip-size/index.js:1:2840: 1 │ ...essFn(o,r):o}return n}},147:e=>{"use strict";e.exports=require("fs")},781:e=>{"use strict";e.exports=require("stream")},796:e=>{"u... ╵ ~~ The package "fs" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error. X [ERROR] Could not resolve "stream" node_modules/next/dist/compiled/gzip-size/index.js:1:2886: 1 │ ...xports=require("fs")},781:e=>{"use strict";e.exports=require("stream")},796:e=>{"use strict";e.exports=require("zlib")}};var r={};... ╵ ~~ The package "stream" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error. X [ERROR] Could not resolve "zlib" node_modules/next/dist/compiled/gzip-size/index.js:1:2936: 1 │ ...rts=require("stream")},796:e=>{"use strict";e.exports=require("zlib")}};var r={};function nccwpck_require(t){var n=r[t];if(n!=... ╵ ~~ The package "zlib" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
19 replies