Skip to content

Commit

Permalink
refactor pages and deleted unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
fuoridallarete committed Jan 31, 2024
1 parent 54f6f52 commit 3f7fe03
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 360 deletions.
13 changes: 10 additions & 3 deletions src/pages/profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import {
import { useGitHubQuery } from "@/hooks";
import Image from "next/image";
import Link from "next/link";
import { exportAsImage } from "@/utils";
import GitHubCalendar from "react-github-calendar";
import { Tooltip as ReactTooltip } from "react-tooltip";
import { exportAsImage } from "@/utils/exportRepositories";
import { ExportOptions } from "@/utils/exportOptions";

interface Activity {
date: string;
Expand Down Expand Up @@ -53,7 +54,11 @@ export default function Profile() {
<button
className="btn-ghost"
onClick={() =>
exportAsImage("#profile-card", "download", "profile-card")
exportAsImage(
"#profile-card",
ExportOptions.Download,
"profile-card"
)
}
>
Download as PNG
Expand All @@ -62,7 +67,9 @@ export default function Profile() {
<li>
<button
className="btn-ghost"
onClick={() => exportAsImage("#profile-card", "clipboard")}
onClick={() =>
exportAsImage("#profile-card", ExportOptions.Clipboard)
}
>
Copy to Clipboard
</button>
Expand Down
Loading

0 comments on commit 3f7fe03

Please sign in to comment.