Skip to content

Commit

Permalink
Revert "fix: disable prefetch globally"
Browse files Browse the repository at this point in the history
This reverts commit ac6d517.
  • Loading branch information
abuaboud committed Oct 2, 2023
1 parent 59c55da commit 42851d0
Show file tree
Hide file tree
Showing 39 changed files with 167 additions and 180 deletions.
6 changes: 3 additions & 3 deletions app/blog/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { Metadata } from "next";
import { NavigationProps } from "../../../components/navigationProps";
import { formatDate } from "@/utils/date-helper";
import { createClient } from "@supabase/supabase-js";
import { ApLink } from "../../../components/MyLink";
import { redirect } from "next/navigation";
import Link from "next/link";


export interface Blog {
Expand Down Expand Up @@ -122,12 +122,12 @@ export default async function BlogPost({ params, searchParams }: NavigationProps
<main className="bg-white w-full">
<section className="container mx-auto px-3 py-[80px] md:px-0 mx-auto ">
<nav className="text-lg mb-[35px]">
<ApLink href="/blog" className="no-underline">
<Link href="/blog" className="no-underline">
{/* Apply your custom styles for the link */}
<span className="text-primary no-underline hover:underline cursor-pointer">
Blogs
</span>
</ApLink>{" "}
</Link>{" "}
</nav>
<header className="mb-[35px] mx-auto text-left">
<h1 className="text-h1-sm lg:text-h1-lg font-bold mb-[35px]">
Expand Down
6 changes: 3 additions & 3 deletions app/blog/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Image from "next/image";
import Link from "next/link";
import { Metadata } from "next";
import { AutomateWithActivepieces } from "../../components/animated-curtains/AutomateWithActivepieces";
import { BlogPost, getBlogs } from "@/utils/blogs-helper";
import { ApLink } from "../../components/MyLink";
import { redirect } from "next/navigation";


Expand Down Expand Up @@ -32,7 +32,7 @@ export async function generateMetadata(): Promise<Metadata> {

function BlogCard({ post }: { post: BlogPost }) {
return (
<ApLink href={`/blog/${post.slug}`}>
<Link href={`/blog/${post.slug}`}>
<div className="flex flex-col h-[460px] rounded overflow-hidden shadow-lg border border-black rounded-md transition duration-500 ease-in-out transform hover:-translate-y-1">
<div className="h-[220px] md:w-[469px] w-full relative">
<Image
Expand All @@ -51,7 +51,7 @@ function BlogCard({ post }: { post: BlogPost }) {
<p className="text-black text-lg font-normal leading-snug tracking-wide">{post.meta.author} | Published On {post.meta.publishedOn}</p>
</div>
</div>
</ApLink>
</Link>
);
}

Expand Down
6 changes: 3 additions & 3 deletions app/features/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Metadata } from "next";
import Link from "next/link";
import { Arrow } from "../../components/arrow";
import { AnimatedCurtains } from "../../components/animated-curtains/AnimatedCurtains";
import { TestimoniesSection } from "../../components/features-page/TestimoniesSection";
Expand All @@ -10,7 +11,6 @@ import CombinationsMakerSection from "../../components/landing-page/Combinations
import { VisibilitySection } from "../../components/features-page/VisibilitySection";
import { FeaturesSection } from "../../components/features-page/FeaturesSection";
import { FeaturesCarousel } from "../../components/features-page/FeaturesCarousel";
import { ApLink } from "../../components/MyLink";
import { redirect } from "next/navigation";


Expand Down Expand Up @@ -48,9 +48,9 @@ export default async function FindAppsPage() {
Meant to be <span className="text-[#EEABFF]">simple</span> yet <br className="hidden lg:block"></br> so powerful
</h1>
<div className="flex items-center justify-center mt-[40px] lg:mt-[80px] ">
<ApLink href="https://cloud.activepieces.com/sign-up" target='_blank' rel='noopener noreferer' className='text-center rounded-sm hover:-translate-y-[6px] transition-transform flex items-center justify-center gap-4 text-h4-sm lg:text-h4-lg text-white bg-primary py-[15px] px-[35px] whitespace-nowrap'>
<Link href="https://cloud.activepieces.com/sign-up" target='_blank' rel='noopener noreferer' className='text-center rounded-sm hover:-translate-y-[6px] transition-transform flex items-center justify-center gap-4 text-h4-sm lg:text-h4-lg text-white bg-primary py-[15px] px-[35px] whitespace-nowrap'>
Get Started <Arrow className="fill-white" width={33.33} height={16.67}></Arrow>
</ApLink>
</Link>
</div>
<div className="border mb-[120px] lg:mb-[150px] border-solid border-white rounded overflow-hidden mt-[40px] lg:mt-[80px]">
<AnimatedCurtains id="indie" intervalPeriod={7000}></AnimatedCurtains>
Expand Down
15 changes: 7 additions & 8 deletions app/find-apps/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Metadata } from "next";


import Link from "next/link";
import { NavigationProps } from "../../../components/navigationProps";
import { GetPieces } from "../../../utils/piece-helper";
import { allPiecesSort, corePieces } from "../../../components/utils";
import { ApLink } from "../../../components/MyLink";
import { redirect } from "next/navigation";
const alphabet = "abcdefghijklmnopqrstuvwxyz".toUpperCase().split("");

Expand Down Expand Up @@ -47,19 +46,19 @@ export default async function FindAppsPage({ params }: NavigationProps) {
{`Browse apps starting with ${params.id.toUpperCase()}`}
</h1>
<div className="flex gap-6 text-black flex-wrap lg:text-h4-sm justify-center mt-[20px] ">
{alphabet.map((letter, idx) => <ApLink key={idx} href={"/find-apps/" + letter.toLowerCase()}>{letter} </ApLink>)}
{alphabet.map((letter, idx) => <Link key={idx} href={"/find-apps/" + letter.toLowerCase()}>{letter} </Link>)}
</div>

<ul className="columns-1 md:columns-2 lg:columns-4 text-black text-h5-sm mt-[40px]">
{filteredPieces.map((piece, idx) => <li key={idx} className="underline">
{
piece === "webhook" ? <ApLink href={`/pieces/webhook`}>Webhook</ApLink> :
piece === "loops" ? <ApLink href={`/pieces/loops`}>Loops</ApLink> :
piece === "branches" ? <ApLink href={`/pieces/branches`}>Branches</ApLink> :
<ApLink href={`/pieces/${piece.name.replace(
piece === "webhook" ? <Link href={`/pieces/webhook`}>Webhook</Link> :
piece === "loops" ? <Link href={`/pieces/loops`}>Loops</Link> :
piece === "branches" ? <Link href={`/pieces/branches`}>Branches</Link> :
<Link href={`/pieces/${piece.name.replace(
"@activepieces/piece-",
""
)}?`} > {piece.displayName}</ApLink>
)}?`} > {piece.displayName}</Link>
}
</li>)}
</ul>
Expand Down
14 changes: 7 additions & 7 deletions app/find-apps/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Metadata } from "next";
import { GetPieces } from "../../utils/piece-helper";
import Link from "next/link";
import { allPiecesSort, corePieces } from "../../components/utils";
import { ApLink } from "../../components/MyLink";
import { redirect } from "next/navigation";
const alphabet = "abcdefghijklmnopqrstuvwxyz".toUpperCase().split("");
export const metadata: Metadata = {
Expand Down Expand Up @@ -37,19 +37,19 @@ export default async function FindAppsPage() {
Browse all apps
</h1>
<div className="flex gap-6 text-black lg:text-h4-sm justify-center flex-wrap mt-[20px] ">
{alphabet.map((letter, idx) => <ApLink key={idx} href={"/find-apps/" + letter.toLowerCase()}>{letter} </ApLink>)}
{alphabet.map((letter, idx) => <Link key={idx} href={"/find-apps/" + letter.toLowerCase()}>{letter} </Link>)}
</div>

<ul className="columns-1 md:columns-2 lg:columns-4 text-black text-h5-sm mt-[40px]">
{allPieces.map((piece, idx) => <li key={idx} className="underline">
{
piece === "webhook" ? <ApLink href={`/pieces/webhook`}>Webhook</ApLink> :
piece === "loops" ? <ApLink href={`/pieces/loops`}>Loops</ApLink> :
piece === "branches" ? <ApLink href={`/pieces/branches`}>Branches</ApLink> :
<ApLink href={`/pieces/${piece.name.replace(
piece === "webhook" ? <Link href={`/pieces/webhook`}>Webhook</Link> :
piece === "loops" ? <Link href={`/pieces/loops`}>Loops</Link> :
piece === "branches" ? <Link href={`/pieces/branches`}>Branches</Link> :
<Link href={`/pieces/${piece.name.replace(
"@activepieces/piece-",
""
)}?`} > {piece.displayName}</ApLink>
)}?`} > {piece.displayName}</Link>
}

</li>)}
Expand Down
6 changes: 3 additions & 3 deletions app/pieces/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import Image from "next/image";
import TriggerOrActionCard from "../../../components/pieces/TriggerOrActionCard";
import { Metadata } from "next";
import { NavigationProps } from "../../../components/navigationProps";
import Link from "next/link";
import { AutomateWithActivepieces } from "../../../components/animated-curtains/AutomateWithActivepieces";
import { ApLink } from "../../../components/MyLink";
import { redirect } from 'next/navigation'


Expand Down Expand Up @@ -142,9 +142,9 @@ export default async function PiecePage({ params }: NavigationProps) {


<section >
<ApLink className=" h-14 p-5 bg-white rounded justify-center items-center gap-3 inline-flex" href={"https://cloud.activepieces.com/sign-up"} target="_blank" rel="noopener noreferrer" >
<Link className=" h-14 p-5 bg-white rounded justify-center items-center gap-3 inline-flex" href={"https://cloud.activepieces.com/sign-up"} target="_blank" rel="noopener noreferrer" >
<div className="text-center text-black font-bold text-2sm leading-loose tracking-wide flex gap-2 items-center">Start for free</div>
</ApLink>
</Link>
</section>
</div>

Expand Down
6 changes: 3 additions & 3 deletions app/pieces/branches/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

import Image from "next/image";
import { Metadata } from "next";
import Link from "next/link";
import { AutomateWithActivepieces } from "../../../components/animated-curtains/AutomateWithActivepieces";
import BranchActionCard from "../../../components/pieces/BranchCard";
import { ApLink } from "../../../components/MyLink";

const conditions: { firstValue: string, operator: string; secondValue?: string; caseSensitive?: boolean }[][] = [
[
Expand Down Expand Up @@ -204,9 +204,9 @@ export default async function branchPage() {


<section >
<ApLink className=" h-14 p-5 bg-white rounded justify-center items-center gap-3 inline-flex" href={"https://cloud.activepieces.com/sign-up"} target="_blank" rel="noopener noreferrer" >
<Link className=" h-14 p-5 bg-white rounded justify-center items-center gap-3 inline-flex" href={"https://cloud.activepieces.com/sign-up"} target="_blank" rel="noopener noreferrer" >
<div className="text-center text-black font-bold text-2sm leading-loose tracking-wide flex gap-2 items-center">Start for free</div>
</ApLink>
</Link>
</section>
</div>

Expand Down
6 changes: 3 additions & 3 deletions app/pieces/loops/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

import Image from "next/image";
import { Metadata } from "next";
import Link from "next/link";
import { AutomateWithActivepieces } from "../../../components/animated-curtains/AutomateWithActivepieces";
import LoopsActionsCard from "../../../components/pieces/LoopActionCard";
import { ApLink } from "../../../components/MyLink";

export async function generateMetadata(): Promise<Metadata> {

Expand Down Expand Up @@ -98,9 +98,9 @@ export default async function LoopsPage() {


<section >
<ApLink className=" h-14 p-5 bg-white rounded justify-center items-center gap-3 inline-flex" href={"https://cloud.activepieces.com/sign-up"} target="_blank" rel="noopener noreferrer" >
<Link className=" h-14 p-5 bg-white rounded justify-center items-center gap-3 inline-flex" href={"https://cloud.activepieces.com/sign-up"} target="_blank" rel="noopener noreferrer" >
<div className="text-center text-black font-bold text-2sm leading-loose tracking-wide flex gap-2 items-center">Start for free</div>
</ApLink>
</Link>
</section>
</div>

Expand Down
6 changes: 3 additions & 3 deletions app/pieces/webhook/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

import Image from "next/image";
import { Metadata } from "next";
import Link from "next/link";
import { AutomateWithActivepieces } from "../../../components/animated-curtains/AutomateWithActivepieces";
import WebhookTriggerCard from "../../../components/pieces/WebhookTriggerCard";
import { ApLink } from "../../../components/MyLink";

export async function generateMetadata(): Promise<Metadata> {

Expand Down Expand Up @@ -98,9 +98,9 @@ export default async function WebhookPage() {


<section >
<ApLink className=" h-14 p-5 bg-white rounded justify-center items-center gap-3 inline-flex" href={"https://cloud.activepieces.com/sign-up"} target="_blank" rel="noopener noreferrer" >
<Link className=" h-14 p-5 bg-white rounded justify-center items-center gap-3 inline-flex" href={"https://cloud.activepieces.com/sign-up"} target="_blank" rel="noopener noreferrer" >
<div className="text-center text-black font-bold text-2sm leading-loose tracking-wide flex gap-2 items-center">Start for free</div>
</ApLink>
</Link>
</section>
</div>

Expand Down
4 changes: 2 additions & 2 deletions components/CookieConsent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Link from "next/link"
import posthog from "posthog-js";
import { ApLink } from "./MyLink";

export const CokkieConsent = (props: { show: boolean, setShow: (show: boolean) => void }) => {
const acceptCookies = () => {
Expand All @@ -13,7 +13,7 @@ export const CokkieConsent = (props: { show: boolean, setShow: (show: boolean) =
return <>
<div className="fixed left-0 right-0 bottom-[10px] w-full text-h6-sm flex text-white bg-[#28282B] rounded-md overflow-hidden container flex-col lg:flex-row mx-auto justify-between items-center p-4 ">
<div className="text-center lg:text-left mb-2 lg:mb-0">
This website uses cookies to ensure you get the best experience on our website. <ApLink href="/privacy" className="text-primary-medium ">Learn more</ApLink>
This website uses cookies to ensure you get the best experience on our website. <Link href="/privacy" className="text-primary-medium ">Learn more</Link>
</div>
<div className="flex gap-2">
<button onClick={() => { props.setShow(false); localStorage.setItem('cookie_consent', 'true'); declineCookies() }} className="text-h6-sm rounded text-center px-2 py-1 ">
Expand Down
Loading

0 comments on commit 42851d0

Please sign in to comment.