Category "frontend"

How to check in SCSS if a variable exists and ha a value?

I am new in SCSS so bear with me :) I have a use case where a SCSS variable --my-variable can exist and can have a value depending on some settings from the bac

Started fullstackopen for the first time and getting a "favicon.ico" request in the network tab

So I basically started this web dev course by fullstackopen and in one of the steps it says that once you open the Developer Console, and refresh the tab, 2 req

How can I keep the text highlighted with JS?

I'm working on a conceptual project. Text reaveal on selection with highlight. I have to keep the text highlighted once it is selected. <div class="reveal" i

Runtime configs in nextjs

I'm trying to setup my nextjs app to use runtime configurations. Basically, I have an endpoint url that needs to be available trough docker env vars. I configur

Vue.js: How to add static data between fetched data?

For my application I want to add advertisement banners after every 5 items in my data. So when you scroll you see five data items that I fetched, 1 advertisemen

Unexpected use of comma operator React

Line 85:74: Unexpected use of comma operator no-sequences Line 85:153: Unexpected use of comma operator <div className={"card text-white bg-success m

Vue3.js ) Error: Cannot find module 'firebase'

I'm using firebase for the first time in vue.js. After installing firebase using npm, I added it to main.js as follows. //main.js import { createApp } from "vue

Pure JavaScript: set min-height of all product title to the highest of them all

In collection pages of our Shopify site, the VIEW DETAILS buttons in every product card are misaligned because of variable lengths of product title. In order to

How can I set the selected value of a dropdown using a smarty variable

I have a list of suppliers and a defaultSupplier assigned to a template, I add the suppliers to a dropdown and iterate through them using a foreach and I try to

swift Xcode Secure Text Entry Asterisk not show when Screen Mirroring / Recording

I have checked the Secure Text Entry and entered "pwdTextfield.isSecureTextEntry = true" as the code. Therefore, I can see the asterisk well inside password tex

How to solve leetcode problem in JavaScript to check if an integer is a palindrome

Here is the code which i tried to solve, for the leetcode problem in javaScript https://leetcode.com/problems/palindrome-number/ Problem i am facing: It is work

Using React to reset the size of a div with CSS resize enabled

Currently I have a resizable div using resize: both; in its CSS. I'd like to make a function to reset the div back to its initial percentage-based size. I got t

Select in form - Problem mapping through options, cannot read properties of undefined (reading 'map')

I am creating a SELECT inside a form in which I need to map through an object (I know mapping through an object instead of an array might be a problem). I am us

Is it possible to use a frontend framework only on one page in an already finished project?

I'm working on a project where I need to make a dashboard as a homepage like this https://www.grapecity.com/wijmo/demos/reference-samples/DynamicDashboard/angu

Glide JS not displaying images

I'm using Glide JS carousel in a VueJS project to display some images (at least 3), but what happens is that only the first of the three images are displayed, w

Angular i18n : How to make language change using URL routing /Switcher Buttons?

I am building a simple app to learn internationalisation using Angular 11. The tutorial I am following is: https://lokalise.com/blog/angular-i18n/ I followed th

How to style element content in Svelte?

<style> color: red; </style> Some html content! this code does not work. In the Angular framework it can be done by using the :host selector.

Next.js: Error: React.Children.only expected to receive a single React element child

I'm having a component called Nav inside components directory and it's code is some thing like below: import Link from 'next/link'; const Nav = () => {

Front end Sensitive info

I am building my first react app and not sure about front end security. I am making a call to the following third party library: emailjs.sendForm(serviceID, tem

type undefined error on ng-apexchart for angular

Help me understand this error, please. I am simply trying to create a bar chart for my angular web app using ng-apexchart. I am following this article . I am no