feat: next/image on /tools, update capture screenshot
This commit is contained in:
parent
5c248388b6
commit
5d2bec1bfc
BIN
public/screenshots/capture.png
Normal file
BIN
public/screenshots/capture.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 MiB |
BIN
public/screenshots/twitter.png
Normal file
BIN
public/screenshots/twitter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 594 KiB |
|
@ -4,7 +4,6 @@ import { NextRequest, NextResponse } from "next/server";
|
||||||
export async function middleware(req: NextRequest) {
|
export async function middleware(req: NextRequest) {
|
||||||
const { pathname, searchParams } = req.nextUrl;
|
const { pathname, searchParams } = req.nextUrl;
|
||||||
|
|
||||||
console.log(pathname);
|
|
||||||
if (pathname === "/dashboards") {
|
if (pathname === "/dashboards") {
|
||||||
const dashboardId = searchParams.get("dashboardId");
|
const dashboardId = searchParams.get("dashboardId");
|
||||||
if (dashboardId) {
|
if (dashboardId) {
|
||||||
|
|
|
@ -1,14 +1,19 @@
|
||||||
import { NextPage } from "next";
|
import { NextPage } from "next";
|
||||||
|
import Image from "next/image";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import captureImg from "../../public/screenshots/capture.png";
|
||||||
|
import dashboardImg from "../../public/screenshots/dashboard.png";
|
||||||
|
import frontpageImg from "../../public/screenshots/frontpage.png";
|
||||||
|
import twitterImg from "../../public/screenshots/twitter.png";
|
||||||
import { Card } from "../web/common/Card";
|
import { Card } from "../web/common/Card";
|
||||||
import { Layout } from "../web/common/Layout";
|
import { Layout } from "../web/common/Layout";
|
||||||
|
|
||||||
type AnyTool = {
|
type AnyTool = {
|
||||||
title: string;
|
title: string;
|
||||||
description: string;
|
description: string;
|
||||||
img?: string;
|
img?: StaticImageData;
|
||||||
};
|
};
|
||||||
|
|
||||||
type InnerTool = AnyTool & { innerLink: string };
|
type InnerTool = AnyTool & { innerLink: string };
|
||||||
|
@ -24,7 +29,7 @@ const ToolCard: React.FC<Tool> = (tool) => {
|
||||||
<div className="grid content-start gap-3">
|
<div className="grid content-start gap-3">
|
||||||
<div className="text-gray-800 text-lg font-medium">{tool.title}</div>
|
<div className="text-gray-800 text-lg font-medium">{tool.title}</div>
|
||||||
<div className="text-gray-500">{tool.description}</div>
|
<div className="text-gray-500">{tool.description}</div>
|
||||||
{tool.img && <img src={tool.img} className="text-gray-500" />}
|
{tool.img && <Image src={tool.img} className="text-gray-500" />}
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
@ -52,27 +57,27 @@ const ToolsPage: NextPage = () => {
|
||||||
title: "Search",
|
title: "Search",
|
||||||
description: "Find forecasting questions on many platforms.",
|
description: "Find forecasting questions on many platforms.",
|
||||||
innerLink: "/",
|
innerLink: "/",
|
||||||
img: "/screenshots/frontpage.png",
|
img: frontpageImg,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "[Beta] Present",
|
title: "[Beta] Present",
|
||||||
description: "Present forecasts in dashboards.",
|
description: "Present forecasts in dashboards.",
|
||||||
innerLink: "/dashboards",
|
innerLink: "/dashboards",
|
||||||
img: "/screenshots/dashboard.png",
|
img: dashboardImg,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Capture",
|
title: "Capture",
|
||||||
description:
|
description:
|
||||||
"Capture forecasts save them to Imgur. Useful for posting them somewhere else as images. Currently rate limited by Imgur, so if you get a .gif of a fox falling flat on his face, that's why. Capture button can be found on individual questions pages.",
|
"Capture forecasts save them to Imgur. Useful for posting them somewhere else as images. Currently rate limited by Imgur, so if you get a .gif of a fox falling flat on his face, that's why. Capture button can be found on individual questions pages.",
|
||||||
innerLink: "/",
|
innerLink: "/",
|
||||||
img: "https://i.imgur.com/EXkFBzz.png",
|
img: captureImg,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Summon",
|
title: "Summon",
|
||||||
description:
|
description:
|
||||||
"Summon metaforecast on Twitter by mentioning @metaforecast, or on Discord by using Fletcher and !metaforecast, followed by search terms.",
|
"Summon metaforecast on Twitter by mentioning @metaforecast, or on Discord by using Fletcher and !metaforecast, followed by search terms.",
|
||||||
externalLink: "https://twitter.com/metaforecast",
|
externalLink: "https://twitter.com/metaforecast",
|
||||||
img: "https://i.imgur.com/BQ4Zzjw.png",
|
img: twitterImg,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "[Beta] Request",
|
title: "[Beta] Request",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user