How to Truncate Text with Ellipsis in Tailwind CSS Introduction When displaying dynamic content in a table or a list, text can sometimes overflow beyond the available space, making the UI look messy. A common solution is to truncate the text with an ellipsis (…) to ensure a clean and responsive design. In this article,… Continue reading How to Truncate Text with Ellipsis in Tailwind CSS
Category: Next.Js
Debugging Missing Console Logs in React Event Handlers
Introduction Encountering issues where console logs are not appearing in your React application can be frustrating. This article walks you through systematic debugging steps to ensure your event handlers are functioning correctly. We will use an example function that is supposed to log messages and prevent editing of an approved order in a React component.… Continue reading Debugging Missing Console Logs in React Event Handlers
Handling Relationships in PostgreSQL in Payload
Payload automatically manages relational data using PostgreSQL under the hood. The relationships will be stored as JSON fields containing references to related documents. const user = await payload.find({ collection: “users”, where: { id: { equals: “USER_ID” }, }, depth: 2, // Fetch nested relationships }); console.log(user); Use depth in API calls to fetch nested relational… Continue reading Handling Relationships in PostgreSQL in Payload
Workflow for the relations on Postgress DB using Payload
Payload CMS uses a schema-based approach to define relationships in the collections configuration. One to One import { CollectionConfig } from “payload/types”; const Users: CollectionConfig = { slug: “users”, fields: [ { name: “profile”, type: “relationship”, relationTo: “profiles”, // The related collection unique: true, // Ensures one-to-one relationship }, ], }; export default Users; import… Continue reading Workflow for the relations on Postgress DB using Payload
Exploring Types in Payload CMS
Payload CMS is a powerful and flexible headless CMS that allows developers to define and manage data structures with precision. One of its standout features is the ability to define types for collections, globals, and fields, enabling type-safe and predictable content management. In this article, we will dive into the different types used in Payload… Continue reading Exploring Types in Payload CMS
Building Scalable Web Applications with Next.js
Next.js is a robust React framework that enables developers to build highly performant and scalable web applications with ease. With features like server-side rendering, static site generation, and API routes, Next.js simplifies modern web development. In this article, we’ll dive into key aspects of Next.js and explore how to leverage its capabilities for your next… Continue reading Building Scalable Web Applications with Next.js
Understanding Interfaces in Next.js and Payload CMS
When working on modern web applications, integrating Next.js with Payload CMS is a powerful combination. To harness their full potential, it is essential to understand the concept of “interface” within this ecosystem. This article will explore the various meanings of the term “interface” in the context of Next.js and Payload CMS, including TypeScript interfaces, admin… Continue reading Understanding Interfaces in Next.js and Payload CMS
Access plesk postgres Database using SSH thunnel
Modify postgresql.conf: 1. Open the file /var/lib/pgsql/data/postgresql.conf in a text editor Add the following line at the end of the file: listen_addresses = ‘*’ Save the changes and close the file. Modify pg_hba.conf: Open the file /var/lib/pgsql/data/pg_hba.conf in a text editor Add the following line at the end of the file: host same role all 203.0.113.2/32 md5 203.0.113.2/32… Continue reading Access plesk postgres Database using SSH thunnel
Role-Based Access Control (RBAC)
Payload CMS offers a powerful and flexible Role-Based Access Control (RBAC) system that enables granular management of user permissions, ensuring that content management workflows are both secure and efficient. With RBAC, administrators can define specific roles and assign detailed permissions to users, dictating exactly what actions they are allowed to perform within the CMS. Whether… Continue reading Role-Based Access Control (RBAC)
Payload – Integration-Friendly
Payload integration-friendly platform, designed to work seamlessly with modern tools and services, making it an excellent choice for developers seeking flexibility and compatibility. For frontend development, Payload pairs effortlessly with Next.js, one of the most popular frameworks for building fast, modern web applications with server-side rendering and static site generation capabilities. On the backend, Payload… Continue reading Payload – Integration-Friendly