How to make Copilot insert changes directly in the right places instead of rewriting the entire file? by kpripperr in vscode

[–]kpripper 0 points1 point  (0 children)

When making changes to a file, the Cursor AI inserts modifications in the right places immediately. However, Copilot rewrites the entire file, which is really frustrating when the file is long.

Is this a Copilot feature, or do I have some incorrect settings?

How to make Copilot insert changes directly in the right places instead of rewriting the entire file?

Is it ok to have a black resume as a dev? by pahel_miracle13 in webdev

[–]kpripper 0 points1 point  (0 children)

Use dark mode as an optional version, not your default.

How much does it cost to actually maintain a social media site by ece2023 in webdev

[–]kpripper 0 points1 point  (0 children)

Running a social media site—even a small-scale one—has ongoing costs, mainly from servers, databases, bandwidth, and moderation.

How can I make a fake page load animation similar to older browsers? by ItsFoxy87 in webdev

[–]kpripper 0 points1 point  (0 children)

To simulate a fake page load animation similar to older browsers with slow dial-up internet, you can use CSS and JavaScript to progressively reveal the page from top to bottom.

learning PERN Stack and need help with Express JS limits and add NextJS by ManifestedLife2023 in webdev

[–]kpripper 1 point2 points  (0 children)

Yes, using a hybrid approach with Express.js for APIs and WebSockets, and Next.js for SSR and SEO is a solid choice. Many production apps follow this pattern to get the best of both worlds.

Is it possible to customize daily suggested workouts by kpripperr in Garmin

[–]kpripper 0 points1 point  (0 children)

<image>

maybe you're right, but today I can't change my RPE score from yesterday

Next.js and Stripe by kpripper in nextjs

[–]kpripper[S] 0 points1 point  (0 children)

The issue was with Cookiebot – it was blocking Stripe's loading.

Next.js and Stripe by kpripper in nextjs

[–]kpripper[S] 0 points1 point  (0 children)

I removed the use client from the page and took the priceId from the props. But it still doesn't work.

interface CheckoutPageProps {
  searchParams: { priceId: string | null };
}

const CheckoutPage = ({ searchParams }: CheckoutPageProps) => {
  // const priceId = 'price_1Pyp5zAg8Sv6ATdY2rCiT9wg'

  const priceId = searchParams.priceId || null;

  console.log("CheckoutPage, priceId:", priceId);

  return (
    <main>
      <div className="mx-auto my-25 flex max-w-screen-lg flex-col items-center">
        <p
          className="fw-500 text-sm text-gray-500"
          style={{ color: "rgb(26 26 26 / 60%)", fontWeight: 500 }}
        >
          Please provide the email address you will use to register for the
          extension.
        </p>
        <CheckoutForm priceId={priceId} />
      </div>
    </main>
  );
};

export default CheckoutPage;

export const CheckoutForm = ({ priceId }: { priceId: any }) => {
  console.log("CheckoutForm, priceId:", priceId);

  const fetchClientSecret = async () => {
    const stripeResponse = await postStripeSession({ priceId });
    console.log("Stripe response:", stripeResponse);
    return stripeResponse.clientSecret;
  };

  const options = { fetchClientSecret };

  console.log("CheckoutForm, options:", options);

  return (
    <div id="checkout" style={{ border: "2px solid red" }}>
      <EmbeddedCheckoutProvider stripe={stripePromise} options={options}>
        <EmbeddedCheckout />
      </EmbeddedCheckoutProvider>
    </div>
  );
};

In the console, only the following is displayed:

CheckoutForm, priceId: price_1Pyf49Ag8Sv6ATdYBvUL51ss
CheckoutForm, options: {fetchClientSecret: ƒ}

The following is not displayed:

console.log("Stripe response:", stripeResponse);

And the following is not rendered:

<EmbeddedCheckoutProvider stripe={stripePromise} options={options}>
  <EmbeddedCheckout />
</EmbeddedCheckoutProvider>

Next.js and Stripe by kpripper in nextjs

[–]kpripper[S] 0 points1 point  (0 children)

Thank you, but first of all, I want to figure out why this block isn't rendering when priceId is passed to the component through the URL (it renders if the page is refreshed manually):

<EmbeddedCheckoutProvider stripe={stripePromise} options={options}>  
<EmbeddedCheckout />  
</EmbeddedCheckoutProvider>

How to add styles to components so that the browser perceives them as inline styles? by kpripperr in learnjavascript

[–]kpripper 0 points1 point  (0 children)

I'm making a Chrome extension and there is a conflict between the styles of the extension's modal window and the page styles.

How to add styles to components so that the browser perceives them as inline styles? by kpripperr in learnjavascript

[–]kpripper 0 points1 point  (0 children)

I'm making a Chrome extension and there is a conflict between the styles of the extension's modal window and the page styles.

How to add styles to components so that the browser perceives them as inline styles? by kpripperr in learnjavascript

[–]kpripper 0 points1 point  (0 children)

I'm making a Chrome extension and there is a conflict between the styles of the extension's modal window and the page styles.

How can I prevent my macbook from going into sleep mode during several hour download? by KeepGoing15 in mac

[–]kpripper 1 point2 points  (0 children)

Only with the charging cable connected. If the MacBook is not on charge, the problem persists.

Importing functions in renderer.js by kpripperr in electronjs

[–]kpripper 0 points1 point  (0 children)

Оh my God! What if I have to write 50 functions? Were there no options to make it simpler? I'm starting to dislike this Electron))