-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(extensions:view): make the page dynamic (ISR)
- Loading branch information
1 parent
4988b58
commit a8cca97
Showing
18 changed files
with
296 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
"extends": "next/core-web-vitals", | ||
"rules": { "react/no-unescaped-entities": "off" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"use client"; | ||
|
||
import { ComponentProps } from "react"; | ||
|
||
export default function Button({ | ||
className, | ||
children, | ||
...props | ||
}: ComponentProps<"button">) { | ||
return ( | ||
<button | ||
className={`bg-[rgba(0,0,0,0.07)] dark:bg-[rgba(255,255,255,0.17)] hover:bg-[#bbb] dark:hover:bg-[#222] focus:outline dark:focus:outline-[#999] focus:outline-2 cursor-pointer font-semibold py-2 px-4 rounded ${className}`} | ||
{...props} | ||
> | ||
{children} | ||
</button> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"use client"; | ||
|
||
import Button from "@/components/Button/Button"; | ||
import { APIExtension } from "@/types/APIExtension"; | ||
import { MdDownload } from "react-icons/md"; | ||
import DeployedCodeUpdate from "../Icons/DeployedCodeUpdate"; | ||
|
||
export default function ExtensionControls({ | ||
extension, | ||
}: { | ||
extension: APIExtension; | ||
}) { | ||
return ( | ||
<div className="block w-[100%] md:w-auto md:flex md:justify-end md:items-start md:gap-2"> | ||
{extension.security === "unsafe" ? ( | ||
<div className="flex text-center px-2 py-2 items-center gap-2 cursor-not-allowed text-[#555] dark:text-[#999]"> | ||
<MdDownload className="inline" /> | ||
Install | ||
</div> | ||
) : ( | ||
<> | ||
<Button className="flex items-center gap-1 pr-5"> | ||
<MdDownload className="inline" /> | ||
Download | ||
</Button> | ||
<div className="md:hidden pt-2"></div> | ||
<Button className="flex items-center gap-1 pr-5"> | ||
<DeployedCodeUpdate /> | ||
Install | ||
</Button> | ||
</> | ||
)} | ||
</div> | ||
); | ||
} |
Oops, something went wrong.