Error [TypeError]: Super expression must either be null or a function

52 Views Asked by At

I am experimenting with a progam called Disqus to add comments section on next.js react.js blog. Not showing any errors but when I try to render the code I get error: "Error [TypeError]: Super expression must either be null or a function"

"use client"
import { DiscussionEmbed } from "disqus-react"
import { Post } from "@/app/lib/interface"
import React from "react"

const DisqusComments = ({Post}) => {
    const disqusShortname = "weeksagenda"  
    const disqusConfig = {
      url: "https://localhost:3000/post/[slug]",
      identifier: Post.url,// Single post id
      title: Post.title // Single post title
    }  
    console.log (disqusShortname, disqusConfig)
    return (
      <div>
        <DiscussionEmbed
          shortname={disqusShortname}
          config={disqusConfig}
        />
      </div>
    )
  }

export default DisqusComments;

I have researched the error extensively. No errors in syntax from what I observe. Not using super constructor. What am I doing wrong?

0

There are 0 best solutions below