Skip to content

Commit

Permalink
fix package imports
Browse files Browse the repository at this point in the history
  • Loading branch information
GraemeFulton committed Jul 26, 2024
1 parent 6a072a0 commit b329158
Show file tree
Hide file tree
Showing 11 changed files with 1,058 additions and 1,537 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@prototypr/prototypr-postie:registry=https://npm.pkg.github.com/
@prototypr/prototypr-interview:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=${GITHUB_PERSONAL_ACCESS_TOKEN}
2 changes: 1 addition & 1 deletion components/BusinessNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { MenuIcon, XIcon } from "@heroicons/react/outline";
import useUser from "@/lib/iron-session/useUser";
import { useState, useEffect } from "react";
import jsCookie from "js-cookie";
import UndoRedoButtons from "./Editor/UndoRedoButtons";
import UndoRedoButtons from "@prototypr/typr/dist/UndoRedoButtons";
const NavigationMenuDemo = dynamic(() => import("./navbar-menu"), {
ssr: true,
});
Expand Down
4 changes: 2 additions & 2 deletions components/toolbox/forms/DescriptionExcerptForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import dynamic from "next/dynamic";
import { useState, useEffect } from "react";
import Button from "@/components/Primitives/Button";
import MiniEditor from "@/components/MiniEditor/MiniEditor";
import useLoad from "../hooks/useLoad";
// import useLoad from "../hooks/useLoad";
import { useWizardContext } from "react-sweet-wizard";
import Editor from "@/components/Editor/Editor";
import Editor from "@prototypr/typr/dist/Editor";
import { ToggleSwitch } from "@/components/atom/Switch/switch";
const Spinner = dynamic(() => import("@/components/atom/Spinner/Spinner"));
const axios = require("axios");
Expand Down
13 changes: 13 additions & 0 deletions lib/addTwitterScript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export const addTwitterScript = () => {

if (!document.getElementById("twitter-widget")) {

const s = document.createElement("script");
s.setAttribute("src", "https://platform.twitter.com/widgets.js");
s.setAttribute("id", "twitter-widget");
s.setAttribute("async", "true");

document.head.appendChild(s);
}
};

2,197 changes: 945 additions & 1,252 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pages/post/[slug].js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { TOTAL_STATIC_POSTS } from "@/lib/constants";
import PostHeader from "@/components/post-header";
import SocialShare from "@/components/SocialShare";
import PostGroupRow from "@/components/v4/layout/PostGroupRow";
import { addTwitterScript } from "@/components/Editor/editorHooks/libs/addTwitterScript";
import { addTwitterScript } from "@/lib/addTwitterScript";
import { createB64WithFallback } from "@/lib/utils/blurHashToDataURL";
import getSponsors from "@/lib/utils/getSponsors";

Expand Down
2 changes: 1 addition & 1 deletion pages/toolbox/[slug].js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import buildToolboxGallery, {
import { formatAllTools } from "@/lib/utils/formatToolContent";
import ToolIconCard from "@/components/v4/card/ToolIconCard";
import HeroCardSection from "@/components/toolbox/HeroCardSectionSimple";
import { addTwitterScript } from "@/components/Editor/editorHooks/libs/addTwitterScript";
import { addTwitterScript } from "@/lib/addTwitterScript";
import { createB64WithFallback } from "@/lib/utils/blurHashToDataURL";
import getSponsors from "@/lib/utils/getSponsors";
import ToolBackgroundCard from "@/components/v4/card/ToolBackgroundCard";
Expand Down
1 change: 0 additions & 1 deletion pages/toolbox/post/[id]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import MediaForm from "@/components/toolbox/forms/MediaForm";
// import Link from "next/link";
// import Button from "@/components/Primitives/Button";
import DealForm from "@/components/toolbox/forms/DealForm";
// import { PublishDialogButton } from "@/components/Editor/PublishDialogButton";
import { PublishToolDialog } from "@/components/toolbox/forms/PublishToolDialog";
import ToolIconCard from "@/components/v4/card/ToolIconCard";
import Button from "@/components/Primitives/Button";
Expand Down
1 change: 0 additions & 1 deletion pages/toolbox/post/[id]/interview/[slug].js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { getToolById } from "@/lib/api";
// /import EditorWrapper from "@/components/Editor/EditorWrapper";
import { getUserArticle, getSlugFromArticleId } from "@/lib/api";
import useUser from "@/lib/iron-session/useUser";
import dynamic from 'next/dynamic';
Expand Down
8 changes: 4 additions & 4 deletions pages/toolbox/post/[id]/interview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import dynamic from "next/dynamic";

import useUser from "@/lib/iron-session/useUser";
import { useEffect, useState } from "react";
import { addTwitterScript } from "@/components/Editor/editorHooks/libs/addTwitterScript";
import { addTwitterScript } from "@/lib/addTwitterScript";

import Editor from "@/components/Editor/Editor";
import Editor from "@prototypr/typr/dist/Editor";
const Spinner = dynamic(() => import("@/components/atom/Spinner/Spinner"));

import useLoad from "@/components/Editor/editorHooks/newPost/useLoad";
import useCreate from "@/components/Editor/editorHooks/newPost/useCreate";
import useLoad from "@prototypr/typr/dist/editorHooks/useLoad";
import useCreate from "@prototypr/typr/dist/editorHooks/useCreate";

import { useRouter } from "next/router";
import EditorNav from "@/components/EditorNav";
Expand Down
Loading

0 comments on commit b329158

Please sign in to comment.