Skip to content

Commit 18a2e56

Browse files
committed
Update index.js
1 parent 4e25c29 commit 18a2e56

File tree

1 file changed

+28
-31
lines changed

1 file changed

+28
-31
lines changed

src/pages/index.js

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ import ThemeChanger from '@/components/ThemeChanger'
1010
import Head from 'next/head'
1111
import Image from 'next/image'
1212
import NextLink from 'next/link'
13-
import Router from 'next/router'
13+
import Router, { useRouter } from 'next/router'
14+
1415

1516
export default function Home() {
17+
const router = useRouter()
1618
return (
1719
<div className="space-y-20 overflow-hidden sm:space-y-32 md:space-y-40 lg:space-y-44">
1820
<Head>
@@ -87,36 +89,31 @@ export default function Home() {
8789
<InlineCode>string programs</InlineCode> to <InlineCode>2D arrays</InlineCode> ,{' '}
8890
<InlineCode>recursion</InlineCode> , <InlineCode>matrices</InlineCode> and many more.
8991
</p>
90-
<div className="mt-12 mb-28 flex flex-col space-y-4 text-center sm:space-y-0 sm:space-x-4 ">
91-
<NextLink href="/docs">
92-
<a>
93-
<button className="focus:outline-none w-full flex-none rounded-lg border border-transparent bg-blue-700 py-3 px-6 text-lg font-semibold leading-6 text-white shadow-md transition-colors duration-200 hover:bg-blue-600 hover:shadow-xl focus:ring-2 focus:ring-blue-600 focus:ring-offset-2 focus:ring-offset-white sm:w-auto">
94-
Get started
95-
</button>
96-
</a>
97-
</NextLink>
98-
<NextLink href="/about">
99-
<a>
100-
<button className="focus:outline-none w-full flex-none rounded-lg border border-transparent bg-gray-900 py-3 px-6 text-lg font-semibold leading-6 text-white shadow-md transition-colors duration-200 hover:bg-gray-700 hover:shadow-xl focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 focus:ring-offset-white dark:bg-gray-700 dark:hover:bg-gray-600 dark:focus:ring-gray-700 sm:w-auto">
101-
Learn more
102-
</button>
103-
</a>
104-
</NextLink>
105-
<NextLink href="https://github.com/sponsors/javaistic">
106-
<a>
107-
<button
108-
className="text-md focus:outline-none flex w-full flex-none items-center justify-center rounded-lg border-2 border-gray-300 bg-gray-50 py-3 font-semibold leading-6 text-gray-900 shadow-md transition-colors duration-200 hover:bg-gray-100 hover:shadow-xl focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-white sm:w-auto sm:px-6"
109-
target="_blank"
110-
rel="noopener noreferrer"
111-
>
112-
<span className="sr-only">(Sponsor Javaistic)</span>
113-
<svg width="24" height="24" fill="none" stroke="#db61a2" strokeWidth={2.5}>
114-
<path d="M18.7663 7.23375C18.3753 6.84262 17.9111 6.53234 17.4002 6.32065C16.8893 6.10896 16.3417 6 15.7887 6C15.2357 6 14.6881 6.10896 14.1772 6.32065C13.6663 6.53234 13.2021 6.84262 12.8112 7.23375L11.9998 8.04511L11.1884 7.23375C10.3987 6.44406 9.32768 6.00041 8.21089 6.00041C7.09409 6.00041 6.02303 6.44406 5.23334 7.23375C4.44365 8.02344 4 9.0945 4 10.2113C4 11.3281 4.44365 12.3991 5.23334 13.1888L6.0447 14.0002L11.9998 19.9553L17.9549 14.0002L18.7663 13.1888C19.1574 12.7979 19.4677 12.3337 19.6794 11.8228C19.891 11.3119 20 10.7643 20 10.2113C20 9.65828 19.891 9.11068 19.6794 8.59978C19.4677 8.08888 19.1574 7.6247 18.7663 7.23375V7.23375Z" />
115-
</svg>
116-
&nbsp;Sponsor
117-
</button>
118-
</a>
119-
</NextLink>
92+
<div className="mt-12 mb-28 flex flex-wrap space-y-4 text-center sm:space-y-0 sm:space-x-4 ">
93+
<button
94+
className="focus:outline-none w-full flex-none rounded-lg border border-transparent bg-blue-700 py-3 px-6 text-lg font-semibold leading-6 text-white shadow-md transition-colors duration-200 hover:bg-blue-600 hover:shadow-xl focus:ring-2 focus:ring-blue-600 focus:ring-offset-2 focus:ring-offset-white sm:w-auto"
95+
type="button" onClick={() => router.push('/docs')}
96+
>
97+
Get started
98+
</button>
99+
<button
100+
className="focus:outline-none w-full flex-none rounded-lg border border-transparent bg-gray-900 py-3 px-6 text-lg font-semibold leading-6 text-white shadow-md transition-colors duration-200 hover:bg-gray-700 hover:shadow-xl focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 focus:ring-offset-white sm:w-auto"
101+
type="button" onClick={() => router.push('/about')}
102+
>
103+
Learn more
104+
</button>
105+
<button
106+
className="text-md focus:outline-none flex w-full flex-none items-center justify-center rounded-lg border-2 border-gray-300 bg-gray-50 py-3 font-semibold leading-6 text-gray-900 shadow-md transition-colors duration-200 hover:bg-gray-100 hover:shadow-xl focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-white sm:w-auto sm:px-6"
107+
target="_blank"
108+
rel="noopener noreferrer"
109+
type="button" onClick={() => router.push('/sponsors')}
110+
>
111+
<span className="sr-only">(Sponsor Javaistic)</span>
112+
<svg width="24" height="24" fill="none" stroke="#db61a2" strokeWidth="2.5">
113+
<path d="M18.7663 7.23375C18.3753 6.84262 17.9111 6.53234 17.4002 6.32065C16.8893 6.10896 16.3417 6 15.7887 6C15.2357 6 14.6881 6.10896 14.1772 6.32065C13.6663 6.53234 13.2021 6.84262 12.8112 7.23375L11.9998 8.04511L11.1884 7.23375C10.3987 6.44406 9.32768 6.00041 8.21089 6.00041C7.09409 6.00041 6.02303 6.44406 5.23334 7.23375C4.44365 8.02344 4 9.0945 4 10.2113C4 11.3281 4.44365 12.3991 5.23334 13.1888L6.0447 14.0002L11.9998 19.9553L17.9549 14.0002L18.7663 13.1888C19.1574 12.7979 19.4677 12.3337 19.6794 11.8228C19.891 11.3119 20 10.7643 20 10.2113C20 9.65828 19.891 9.11068 19.6794 8.59978C19.4677 8.08888 19.1574 7.6247 18.7663 7.23375V7.23375Z"></path>
114+
</svg>
115+
&nbsp;Sponsor
116+
</button>
120117
</div>
121118
</div>
122119
<Hero />

0 commit comments

Comments
 (0)