Skip to content

Commit

Permalink
replace kofi button with react-kofi, plus all that config stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
GraemeFulton committed Aug 19, 2024
1 parent b3cf816 commit c922487
Show file tree
Hide file tree
Showing 27 changed files with 18,557 additions and 26,274 deletions.
1 change: 1 addition & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
if grep -q '"workspaces":' package.json; then
echo "Error: package.json contains a workspaces section. Push aborted."
echo "Please remove the workspaces section before pushing."
echo "To do this, run './switch-mode.sh npm', recommit, then push again."
exit 1
fi

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,10 @@ There is a script in the root of the repo to switch between npm packages and loc

- `./switch-mode.sh local` to switch to local development mode
- `./switch-mode.sh npm` to switch to npm packages mode
- `./switch-mode.sh src` to switch to src mode

switch-mode will update the package.json in the root directory to point to the correct version of the package.

#### Path aliases:
* the `~` in the jsconfig.json is a path alias for the node_modules folder. This is to allow the use of the local packages in the src mode.
* the `@` in the jsconfig.json is a path alias for the project root.
9 changes: 5 additions & 4 deletions app/typr/PageContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
} from "@/lib/typr-demo/indexedDB"; // Import the IndexedDB utility



import "tiptypr/dist/styles.css";
import "~/react-kofi/dist/kofi.css";
import "~/tiptypr/dist/styles.css";
import Tiptypr from "tiptypr";
// import Head from 'next/head';

Expand Down Expand Up @@ -42,7 +42,8 @@ import { defaultProps } from "tiptypr";
import { customDeepMerge } from "@/lib/typr-demo/customDeepMerge";
import IndexedDBBrowser from "@/components/typr-demo/IndexedDBBrowser";
import { openDB } from "idb";
import KoFiDialog from "@/components/ko-fi-button/KoFiDialog";
// import KoFiDialog from "@/components/ko-fi-button/KoFiDialog";
import {KoFiDialog} from "react-kofi";

const avatarOptions = [
{
Expand Down Expand Up @@ -628,7 +629,7 @@ function DemoPageContent() {
Graeme
</a>
</p>
<KoFiDialog color="#53b1e6" label={"Support me"} />
<KoFiDialog color="#53b1e6" label={"Support me"}/>
</div>
</div>
<DemoCodeDialog
Expand Down
9 changes: 4 additions & 5 deletions components/authorBio.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import SocialShare from "@/components/SocialShare";
import Image from "next/image";
import dynamic from "next/dynamic";
// import dynamic from "next/dynamic";
import { DribbbleLogo, GithubLogo, TwitterLogo } from "./icons";

const KoFiButton = dynamic(
() => import("@/components/ko-fi-button/Ko-Fi-Button"),
{ ssr: false }
);

import '~/react-kofi/dist/kofi.css';
import {KoFiButton} from "react-kofi";

export default function AuthorBio({ author, slug, title }) {
const pic = author?.avatar?.data?.attributes?.url
Expand Down
20 changes: 0 additions & 20 deletions components/ko-fi-button/Ko-Fi-Button.js

This file was deleted.

57 changes: 0 additions & 57 deletions components/ko-fi-button/KoFi-Widget.js

This file was deleted.

116 changes: 0 additions & 116 deletions components/ko-fi-button/KoFi.css

This file was deleted.

28 changes: 0 additions & 28 deletions components/ko-fi-button/KoFi.js

This file was deleted.

73 changes: 0 additions & 73 deletions components/ko-fi-button/KoFiDialog.js

This file was deleted.

Loading

0 comments on commit c922487

Please sign in to comment.