<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Finn</title>
    <description>The latest articles on DEV Community by Finn (@zetax).</description>
    <link>https://dev.to/zetax</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F833829%2F50ee4dc0-1d4c-419d-94f4-f32f2c6c72e0.jpeg</url>
      <title>DEV Community: Finn</title>
      <link>https://dev.to/zetax</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zetax"/>
    <language>en</language>
    <item>
      <title>Discord OAuth2 redirect uri invalid</title>
      <dc:creator>Finn</dc:creator>
      <pubDate>Sat, 30 Apr 2022 13:57:57 +0000</pubDate>
      <link>https://dev.to/zetax/discord-oauth2-redirect-uri-invalid-2koe</link>
      <guid>https://dev.to/zetax/discord-oauth2-redirect-uri-invalid-2koe</guid>
      <description>&lt;p&gt;Hey there! I tried creating a discord login for my website, but it always gives me the &lt;code&gt;Invalid OAuth2 redirect_uri&lt;/code&gt; for my webpage even though it should be correct. My website is currently locally under localhost:3000 and I added the uri as &lt;code&gt;localhost:3000/api/auth/callback/discord&lt;/code&gt;. Does anyone know what I did wrong here? I am using latest Next auth afaik.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How do I clean up my json response?</title>
      <dc:creator>Finn</dc:creator>
      <pubDate>Fri, 22 Apr 2022 22:12:38 +0000</pubDate>
      <link>https://dev.to/zetax/how-do-i-clean-up-my-json-response-22h2</link>
      <guid>https://dev.to/zetax/how-do-i-clean-up-my-json-response-22h2</guid>
      <description>&lt;p&gt;Hey there! I am trying to store a json response in a mongodb database, but that isn't working because of the annoying format that looks like this: &lt;code&gt;{ '0': '9M0FY9GXM0' }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Does anyone know how to make it just output the second string instead of all of it when using for example "&lt;code&gt;console.log(res.data)&lt;/code&gt;"?&lt;/p&gt;

&lt;p&gt;Thank you very much!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The top-level-await experiment is not enabled</title>
      <dc:creator>Finn</dc:creator>
      <pubDate>Thu, 21 Apr 2022 10:33:01 +0000</pubDate>
      <link>https://dev.to/zetax/the-top-level-await-experiment-is-not-enabled-494o</link>
      <guid>https://dev.to/zetax/the-top-level-await-experiment-is-not-enabled-494o</guid>
      <description>&lt;p&gt;Hey there! Every time I try to run my dev server or create a production build, this error pops up: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZpnQeRvI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mhzmnr5pmibe5buc6xsg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZpnQeRvI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mhzmnr5pmibe5buc6xsg.png" alt="Image description" width="880" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have no idea why this is happening, especially because I can't remember changing anything in there. I hope someone can help me!&lt;/p&gt;

&lt;p&gt;Greetings, Finn&lt;/p&gt;

</description>
    </item>
    <item>
      <title>NextJS Key not working</title>
      <dc:creator>Finn</dc:creator>
      <pubDate>Wed, 20 Apr 2022 13:47:44 +0000</pubDate>
      <link>https://dev.to/zetax/nextjs-key-not-working-3720</link>
      <guid>https://dev.to/zetax/nextjs-key-not-working-3720</guid>
      <description>&lt;p&gt;Hey there! I tried creating an array with nextjs but I always get the error &lt;code&gt;Missing "key" prop for element in iterator&lt;/code&gt;. Does anyone know how to fix that error? I really don't know what I did wrong&lt;/p&gt;

&lt;p&gt;The code:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qw_15sLd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6g2nnz3v7jfrw9izcopi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qw_15sLd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6g2nnz3v7jfrw9izcopi.png" alt="Image description" width="880" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My data: (These aren't real ip adresses)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--samqzI2K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1bvd86xqjxon5ftb00yk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--samqzI2K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1bvd86xqjxon5ftb00yk.png" alt="Image description" width="880" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>StyledFirebaseUI not working</title>
      <dc:creator>Finn</dc:creator>
      <pubDate>Sat, 26 Mar 2022 15:09:37 +0000</pubDate>
      <link>https://dev.to/zetax/styledfirebaseui-not-working-3o02</link>
      <guid>https://dev.to/zetax/styledfirebaseui-not-working-3o02</guid>
      <description>&lt;p&gt;Hey everyone!&lt;/p&gt;

&lt;p&gt;I tried using firebase auth, and it all works fine, but it only works when I remove a line from a package from node_modules, or else I get the error&lt;/p&gt;

&lt;p&gt;&lt;code&gt;./node_modules/firebaseui/dist/firebaseui.css&lt;br&gt;
Global CSS cannot be imported from within node_modules.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Does anyone know a fix to this or do I have to fork the package and then use it with vercel?&lt;/p&gt;

</description>
    </item>
    <item>
      <title>React router page just disappearing</title>
      <dc:creator>Finn</dc:creator>
      <pubDate>Sun, 20 Mar 2022 22:42:23 +0000</pubDate>
      <link>https://dev.to/zetax/react-router-page-just-disappearing-1lhp</link>
      <guid>https://dev.to/zetax/react-router-page-just-disappearing-1lhp</guid>
      <description>&lt;p&gt;Hey there! I recently tried using react for a website that lists all freelancers, but now when I try to access a specific freelancer's site, it just shows a blank page. My code is here:&lt;/p&gt;

&lt;p&gt;App.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Navbar from './Navbar';
import Home from './Home';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import Create from './Create';
import Freelancerdetails from './FreelancerDetails';

function App() {

  return (
    &amp;lt;Router&amp;gt;
      &amp;lt;div className="App"&amp;gt;
        &amp;lt;Navbar /&amp;gt;
        &amp;lt;div className="content"&amp;gt;
          &amp;lt;Switch&amp;gt;
            &amp;lt;Route exact path="/"&amp;gt;
              &amp;lt;Home /&amp;gt;
            &amp;lt;/Route&amp;gt;
            &amp;lt;Route exact path="/create"&amp;gt;
              &amp;lt;Create /&amp;gt;
            &amp;lt;/Route&amp;gt;
            &amp;lt;Route path="/freelancers/:username" &amp;gt;
              &amp;lt;Freelancerdetails /&amp;gt;
            &amp;lt;/Route&amp;gt;
          &amp;lt;/Switch&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/Router&amp;gt;
  );
}

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;FreelancerDetails.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useParams } from "react-router-dom";

const Freelancerdetails = () =&amp;gt; {
    const { username } = useParams();

  return (
    &amp;lt;div className="freelancer-details"&amp;gt;
      &amp;lt;h2&amp;gt;Freelancer details - { username }&amp;lt;/h2&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default Freelancerdetails;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Home.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState, useEffect } from "react";
import BlogList from "./BlogList";

const Home = () =&amp;gt; {
  const [freelancers, setFreelancers] = useState([
    { skills: 'Not loading', name: 'mario', id: 1, homepage: "https://zetax.dev" },
  ])
  const [isPending, setisPending] = useState(true);

  useEffect(() =&amp;gt; {
        const fetchData = async () =&amp;gt; {
          const response = await fetch("https://149-56-112-99.my.local-ip.co/", {
          });
            const data = await response.json();
            const newFreelancers = data.slice(0, 50);
            setFreelancers(newFreelancers);
            setisPending(false);
        }
        fetchData();
    }, []);

  return (
    &amp;lt;div className="home"&amp;gt;
      { isPending &amp;amp;&amp;amp; &amp;lt;div&amp;gt;Fetching data...&amp;lt;/div&amp;gt; }
      &amp;lt;BlogList freelancers={freelancers} title="All Freelancers" /&amp;gt;
      &amp;lt;a href="https://zetax.dev" className="watermark"&amp;gt;Made by Zetax&amp;lt;/a&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default Home;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;BlogList.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { faTrash } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Link } from 'react-router-dom';

const BlogList = ({ freelancers, title, }) =&amp;gt; {

    return (
        &amp;lt;div className="blog-list"&amp;gt;
            &amp;lt;h2&amp;gt;{title}&amp;lt;/h2&amp;gt;
            {freelancers.map(blog =&amp;gt; (
                &amp;lt;div className="blog-preview" key={blog.id} &amp;gt;
                    &amp;lt;h2&amp;gt;&amp;lt;Link to={ "/freelancers/" + blog.name}&amp;gt;{blog.name}&amp;lt;/Link&amp;gt;&amp;lt;/h2&amp;gt;
                    &amp;lt;p&amp;gt;Skills: {blog.skills}&amp;lt;/p&amp;gt;
                    &amp;lt;a href={blog.homepage}&amp;gt;Visit Homepage&amp;lt;/a&amp;gt;
                &amp;lt;/div&amp;gt;
            ))}
        &amp;lt;/div&amp;gt;
    );
}

export default BlogList;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I really hope someone would be willing to help me as it's a really frustrating issue to deal with! Greetings, Finn&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
