Pranoy
Pranoy
Explore posts from servers
DTDrizzle Team
Created by Pranoy on 2/3/2024 in #help
Error with postgres package
Error: Failed to load external module node:stream: TypeError: Native module not found: node:stream at <unknown> (file:///workspace/telehunt/.next/server/edge/chunks/edge-wrapper_98e036.js:525) at externalRequire (file:///workspace/telehunt/.next/server/edge/chunks/edge-wrapper_98e036.js:1328:15) at <unknown> (file:///workspace/telehunt/.next/server/edge/chunks/node_modules_postgres_cfb1423c..js:926:47) at [project]/node_modules/postgres/cf/src/connection.js [middleware] (ecmascript) (file:///workspace/telehunt/.next/server/edge/chunks/node_modules_postgres_cfb1423c..js:1650:3) at <unknown> (file:///workspace/telehunt/.next/server/edge/chunks/edge-wrapper_98e036.js:501:27) at runModuleExecutionHooks (file:///workspace/telehunt/.next/server/edge/chunks/edge-wrapper_98e036.js:541:9) at instantiateModule (file:///workspace/telehunt/.next/server/edge/chunks/edge-wrapper_98e036.js:500:9) at getOrInstantiateModuleFromParent (file:///workspace/telehunt/.next/server/edge/chunks/edge-wrapper_98e036.js:573:12) at esmImport (file:///workspace/telehunt/.next/server/edge/chunks/edge-wrapper_98e036.js:123:20) at <unknown> (file:///workspace/telehunt/.next/server/edge/chunks/node_modules_postgres_cfb1423c..js:1942:155) at [project]/node_modules/postgres/cf/src/index.js [middleware] (ecmascript) (file:///workspace/telehunt/.next/server/edge/chunks/node_modules_postgres_cfb1423c..js:2410:3) { middleware: true }
1 replies
TTCTheo's Typesafe Cult
Created by Pranoy on 7/27/2023 in #questions
E-commerce website to master full stack Development
Hey guys, i m a normal reactjs developer ( frontend) and a intermediate django developer. I have planned a very complex e-commerce project in a markdown file. Basically i wanna create this as a personal project to master some technologies like ( Frontend, Backend, Postgresql) i have some options and i confused between them. Please explain me that what stack is best for my learning project and why should I use that instead of two others 1: Nextjs 13 ( Fullstack ) 2: React + React Router + Django + Postgresql
17 replies
TTCTheo's Typesafe Cult
Created by Pranoy on 7/23/2023 in #questions
setInterval for placeholder changing
"use client";

import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { cn } from "@/lib/utils";
import React, { useEffect, useState } from "react";
import { AiOutlineSearch } from "react-icons/ai";

const Search = ({ className }: { className: string }) => {
const placeholders: string[] = [
"Search products...",
"Search categories...",
"Search clothes...",
"Search mobile phones...",
];
const [placeholder, setPlaceholder] = useState<string>(placeholders[0]);
const [placeholderIndex, setPlaceholderIndex] = useState<number>(0);

useEffect(() => {
const interval = setInterval(() => {
setPlaceholderIndex((index) => (index + 1) % placeholders.length);
}, 3000);
return () => clearInterval(interval);
}, []);

useEffect(() => {
setPlaceholder(placeholders[placeholderIndex]);
}, [placeholderIndex]);
return (
<div className={cn("items-center", className)}>
<Input placeholder={placeholder} className="rounded-r-none" type="text" />
<Button className="rounded-l-none">
<AiOutlineSearch />
</Button>
</div>
);
};

export default Search;
"use client";

import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { cn } from "@/lib/utils";
import React, { useEffect, useState } from "react";
import { AiOutlineSearch } from "react-icons/ai";

const Search = ({ className }: { className: string }) => {
const placeholders: string[] = [
"Search products...",
"Search categories...",
"Search clothes...",
"Search mobile phones...",
];
const [placeholder, setPlaceholder] = useState<string>(placeholders[0]);
const [placeholderIndex, setPlaceholderIndex] = useState<number>(0);

useEffect(() => {
const interval = setInterval(() => {
setPlaceholderIndex((index) => (index + 1) % placeholders.length);
}, 3000);
return () => clearInterval(interval);
}, []);

useEffect(() => {
setPlaceholder(placeholders[placeholderIndex]);
}, [placeholderIndex]);
return (
<div className={cn("items-center", className)}>
<Input placeholder={placeholder} className="rounded-r-none" type="text" />
<Button className="rounded-l-none">
<AiOutlineSearch />
</Button>
</div>
);
};

export default Search;
Is this a good way to change placeholder text? 😅 or this make performance issue? Im learning react so thats why i dont know whats the proper way to impliment this logic
2 replies
TTCTheo's Typesafe Cult
Created by Pranoy on 7/20/2023 in #questions
responsive with javascript
Hey guys, I have a question, I'm working on a e-commerce project with nextjs & tailwind, so I'm using javascript to responsive the layout insted of tailwind, is it a good idea ? I have created a hook called "useScreenSize" and i use it to make the layout responsive... Is this a good practice or a bad practice?
7 replies
TTCTheo's Typesafe Cult
Created by Pranoy on 7/13/2023 in #questions
Confused with t3-stack
I have planned a production project with nextjs, but confused, should I use t3-stack or not?? Because as I can see nextjs pushed app/ but t3 doesn't support it so just asking what is the best option, also i wanna use chakra ui with it, but emotion is not supported in app/ properly i guess
47 replies
TTCTheo's Typesafe Cult
Created by Pranoy on 7/9/2023 in #questions
Pages or App ?
I'm going to create a production project with nextjs, but confused, What is the best option pages/ or app/ ? Also i love the pages/ but i guess nextjs will remove it in one, two year ?? Or it stays forever??
9 replies
TTCTheo's Typesafe Cult
Created by Pranoy on 6/23/2023 in #questions
Earning tips
I'm a intermediate full stack web developer 😃, and i want to create a own production website and earn money with it using Google ads, So that i can get the experience of how to manage/handle a website with traffic, so what is the best Website topic for this?? Anyone have any suggestions?? Also I'm 18 and i want some side income because im studying in 12th so if you guys have some website ideas please share with me ❤️
4 replies
TTCTheo's Typesafe Cult
Created by Pranoy on 6/17/2023 in #questions
Mern stack Or Nextjs ?
I have a question in which case I have to use mern stack, and in which case I have to use nextjs? And i know nextjs well should i learn mern stack too??
28 replies