Kryp Arnold
Kryp Arnold
Explore posts from servers
DTDrizzle Team
Created by Kryp Arnold on 6/24/2024 in #help
How to select with references
hello guys, im trying to achieve the thing in prisma
2 replies
KPCKevin Powell - Community
Created by Kryp Arnold on 5/12/2024 in #front-end
Can't horizontal scroll
Hello guys i have a simple react component, the problem is the "tags" div doesnt go into horizontal overflow it just sticks to the parent's width, i tried so many things but couldnt make it
"use client";
import { timePassed } from "@/utils";
import Link from "next/link";
import { PencilIcon, ClockIcon } from "./Icons";
import { useEffect, useState } from "react";
import { Blog } from "@prisma/client";

interface BlogCardProps {
blog: Blog;
}

export default function BlogCard({ blog }: BlogCardProps) {
const [timeStamp, setTimeStamp] = useState(timePassed(blog.createdAt));

useEffect(() => {
setTimeStamp(timePassed(blog.createdAt));
}, [blog.createdAt]);

return (
<Link href={"blogs/" + blog.id} className="border-b-2 p-3 md:rounded-xl md:border-2 gap-2 md:gap-3 flex flex-col first:border-t-2 hover:shadow-[0_0_10px_#ffffff] transition-shadow duration-300">
<div className="text-xl md:text-2xl leading-7 md:leading-normal">
{blog.title}
</div>
<div className="whitespace-pre-wrap text-lg md:text-xl leading-6 md:leading-normal">
{blog.description}
</div>
<div className="flex justify-between">
<div className="flex items-center">
<PencilIcon className="size-5 mr-1" />
<div>
{blog.author}
</div>
</div>
<div className="flex items-center">
<ClockIcon className="size-5 mr-1" />
{timeStamp ?? timePassed(blog.createdAt)}
</div>
</div>
{blog.tags?.length && <div className="flex gap-3">
{blog.tags.map((tag, index) => (
<div key={index} className="p-1 text-sm md:text-base rounded-xl">
{tag}
</div>
))}
</div>}
</Link>
);
}
"use client";
import { timePassed } from "@/utils";
import Link from "next/link";
import { PencilIcon, ClockIcon } from "./Icons";
import { useEffect, useState } from "react";
import { Blog } from "@prisma/client";

interface BlogCardProps {
blog: Blog;
}

export default function BlogCard({ blog }: BlogCardProps) {
const [timeStamp, setTimeStamp] = useState(timePassed(blog.createdAt));

useEffect(() => {
setTimeStamp(timePassed(blog.createdAt));
}, [blog.createdAt]);

return (
<Link href={"blogs/" + blog.id} className="border-b-2 p-3 md:rounded-xl md:border-2 gap-2 md:gap-3 flex flex-col first:border-t-2 hover:shadow-[0_0_10px_#ffffff] transition-shadow duration-300">
<div className="text-xl md:text-2xl leading-7 md:leading-normal">
{blog.title}
</div>
<div className="whitespace-pre-wrap text-lg md:text-xl leading-6 md:leading-normal">
{blog.description}
</div>
<div className="flex justify-between">
<div className="flex items-center">
<PencilIcon className="size-5 mr-1" />
<div>
{blog.author}
</div>
</div>
<div className="flex items-center">
<ClockIcon className="size-5 mr-1" />
{timeStamp ?? timePassed(blog.createdAt)}
</div>
</div>
{blog.tags?.length && <div className="flex gap-3">
{blog.tags.map((tag, index) => (
<div key={index} className="p-1 text-sm md:text-base rounded-xl">
{tag}
</div>
))}
</div>}
</Link>
);
}
4 replies
DIAdiscord.js - Imagine an app
Created by Kryp Arnold on 12/27/2023 in #djs-questions
weird UnknownInteractionError
i've sent my slashCommand file, i just get randomly UnknownInteractionError on the first run of command.
17 replies
DIAdiscord.js - Imagine an app
Created by Kryp Arnold on 12/25/2023 in #djs-questions
Is it possible to save hidden data in embed?
Is there anyway to save hidden data in embed, because i have command sending an embed and that embed has buttons, after user clicking the button, i need to extract a data from command parameters like a channelId or something, is it possible?
13 replies
DTDrizzle Team
Created by Kryp Arnold on 12/19/2023 in #help
Json table
Hello guys i have a json object like this;
{
a: [], //<---- string list
b: [],
... and all the alphabet
}
{
a: [], //<---- string list
b: [],
... and all the alphabet
}
how can i turn this into a table?
1 replies
DIAdiscord.js - Imagine an app
Created by Kryp Arnold on 2/4/2023 in #djs-questions
Connection Timeout Error
ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (C:\kryp\chizue\node_modules\undici\lib\core\connect.js:131:24)
at C:\kryp\chizue\node_modules\undici\lib\core\connect.js:78:46
at Immediate._onImmediate (C:\kryp\chizue\node_modules\undici\lib\core\connect.js:117:33)
at processImmediate (node:internal/timers:466:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
} Promise {
<rejected> ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (C:\kryp\chizue\node_modules\undici\lib\core\connect.js:131:24)
at C:\kryp\chizue\node_modules\undici\lib\core\connect.js:78:46
at Immediate._onImmediate (C:\kryp\chizue\node_modules\undici\lib\core\connect.js:117:33)
at processImmediate (node:internal/timers:466:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
}
ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (C:\kryp\chizue\node_modules\undici\lib\core\connect.js:131:24)
at C:\kryp\chizue\node_modules\undici\lib\core\connect.js:78:46
at Immediate._onImmediate (C:\kryp\chizue\node_modules\undici\lib\core\connect.js:117:33)
at processImmediate (node:internal/timers:466:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
} Promise {
<rejected> ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (C:\kryp\chizue\node_modules\undici\lib\core\connect.js:131:24)
at C:\kryp\chizue\node_modules\undici\lib\core\connect.js:78:46
at Immediate._onImmediate (C:\kryp\chizue\node_modules\undici\lib\core\connect.js:117:33)
at processImmediate (node:internal/timers:466:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
}
12 replies
DIAdiscord.js - Imagine an app
Created by Kryp Arnold on 12/26/2022 in #djs-questions
Can't deploy slash commands!
I can't deploy my slash commands, its just doesn't give any error, i dont get it
34 replies
DIAdiscord.js - Imagine an app
Created by Kryp Arnold on 12/7/2022 in #djs-questions
Sending file without file
Hello, i want to send a string as a file, how can i do that?
13 replies