Skip to content

Commit

Permalink
add robots.txt and sitemap, replace anchor tags for button tags and a…
Browse files Browse the repository at this point in the history
…dd vite JS compress plugin
  • Loading branch information
Rodriguespn committed Feb 22, 2024
1 parent a5b012a commit ab78e4f
Show file tree
Hide file tree
Showing 10 changed files with 290 additions and 42 deletions.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/x-icon" href="./src/assets/ward-logo-blue.svg" />
<meta name="description" content="Creating the next-gen of crypto compliance" />
<link rel="icon" type="image/x-icon" href="./src/assets/ward-logo-icon-blue.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="Ward Analytics" />
<meta property="og:description" content="A next-gen blockchain graph explorer" />
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"react-share": "^5.0.3",
"reactflow": "^11.10.1",
"uuid": "^9.0.1",
"vite-plugin-environment": "^1.1.3",
"yarn": "^1.22.21",
"zod": "^3.22.4"
},
Expand All @@ -58,7 +57,9 @@
"react-router-dom": "^6.20.1",
"tailwindcss": "^3.3.6",
"typescript": "^5.2.2",
"vite": "^5.0.10"
"vite": "^5.0.10",
"vite-plugin-compression2": "^0.12.0",
"vite-plugin-environment": "^1.1.3"
},
"packageManager": "[email protected]",
"prettier": {
Expand Down
7 changes: 7 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
User-agent: Googlebot
Disallow: /nogooglebot/

User-agent: *
Allow: /

Sitemap: https://wardanalytics.app/sitemap.xml
16 changes: 16 additions & 0 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->


<url>
<loc>https://wardanalytics.app/</loc>
<lastmod>2024-02-21T01:48:11+00:00</lastmod>
</url>


</urlset>
Binary file added src/assets/ward-logo-icon-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/banner/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ const Banner: FC = () => {
</svg>
Register now for free, unlimited graph lookups
</p>
<a
<button
className="flex-none cursor-pointer rounded-full bg-gray-900 px-3.5 py-1 text-xs font-semibold text-white shadow-sm hover:bg-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-900"
onClick={() => setIsLoginDialogOpen(true)}
>
Sign In / Up <span aria-hidden="true">&rarr;</span>
</a>
</button>
</div>
<div className="flex flex-1 justify-end"></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/common/RiskIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ const RiskIndicator: FC<RiskIndicatorProps> = ({
</li>
<li className="flex flex-row items-center gap-x-1">
<ArrowsPointingInIcon className="h-5 w-5 text-blue-200" />
<a className="font-bold">Direct Exposure,</a> both incoming and
<span className="font-bold">Direct Exposure,</span> both incoming and
outgoing
</li>
<li className="flex flex-row items-center gap-x-1">
<ChevronDoubleDownIcon className="h-5 w-5 text-blue-200" />
<a className="font-bold">Indirect Exposure,</a> both incoming and
<span className="font-bold">Indirect Exposure,</span> both incoming and
outgoing
</li>
</ul>
Expand Down
60 changes: 30 additions & 30 deletions src/components/graph/hotbar/Hotbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import CreateGraphDialog from "./components/CreateGraphDialog";

interface HotbarButton {
onClick?: () => void;
href?: string;
Icon: any;
name: string;
className?: string;
Expand All @@ -39,7 +38,6 @@ const HotbarButton: FC<HotbarButton> = ({
className,
iconColor,
hotKey,
href,
}) => {
const hotKeyClicked = hotKey ? useKeyPress(hotKey) : false;

Expand All @@ -50,33 +48,31 @@ const HotbarButton: FC<HotbarButton> = ({
}, [hotKeyClicked]);

return (
<a href={href} target="_blank" className="h-full w-full">
<button
className={clsx("group flex flex-row items-center", className)}
key={name}
onClick={onClick}
>
<span className="pointer-events-none absolute mr-[100%] mt-0.5 flex w-max translate-x-[-100%] flex-row rounded-lg bg-gray-800 px-3 py-2 text-sm font-medium text-white opacity-0 shadow-sm transition-opacity duration-300 group-hover:opacity-100 dark:bg-gray-700">
{hotKey && (
<span
className="mr-5 font-normal capitalize text-gray-400
<button
className={clsx("group flex flex-row items-center", className)}
key={name}
onClick={onClick}
>
<span className="pointer-events-none absolute mr-[100%] mt-0.5 flex w-max translate-x-[-100%] flex-row rounded-lg bg-gray-800 px-3 py-2 text-sm font-medium text-white opacity-0 shadow-sm transition-opacity duration-300 group-hover:opacity-100 dark:bg-gray-700">
{hotKey && (
<span
className="mr-5 font-normal capitalize text-gray-400
"
>
{hotKey}
</span>
)}
{name}
</span>
<Icon
className={clsx(
"h-10 w-10 rounded-lg p-1 transition-all duration-200",
iconColor
? iconColor
: "text-gray-400 hover:bg-gray-700 hover:text-gray-200",
)}
/>
</button>
</a>
>
{hotKey}
</span>
)}
{name}
</span>
<Icon
className={clsx(
"h-10 w-10 rounded-lg p-1 transition-all duration-200",
iconColor
? iconColor
: "text-gray-400 hover:bg-gray-700 hover:text-gray-200",
)}
/>
</button>
);
};

Expand Down Expand Up @@ -212,8 +208,12 @@ const Hotbar: FC<HotbarProps> = ({
<HotbarButton
Icon={BugAntIcon}
name="Report Bug / Submit Feedback"
onClick={() => { logAnalyticsEvent("report_bug_clicked") }}
href="https://forms.gle/yCFrDnKyUmPYPhfg8"
onClick={() => {
logAnalyticsEvent("report_bug_clicked")
// Open in a new tab to avoid losing the current graph
// To improve SEO, this action is onClick instead of a simple link because the other buttons don't use href
window.open("https://forms.gle/yCFrDnKyUmPYPhfg8", "_blank")
}}
/>
</HotbarButtonGroup>
</div>
Expand Down
2 changes: 2 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import EnvironmentPlugin from "vite-plugin-environment";
import { compression } from "vite-plugin-compression2";

// https://vitejs.dev/config/
export default defineConfig({
Expand All @@ -25,6 +26,7 @@ export default defineConfig({
include: "**/*.{jsx,tsx}",
}),
EnvironmentPlugin("all"),
compression(),
],
server: {
port: 3000,
Expand Down
Loading

0 comments on commit ab78e4f

Please sign in to comment.