Skip to content

Commit

Permalink
migrated to next 14
Browse files Browse the repository at this point in the history
  • Loading branch information
codypharm committed Feb 26, 2024
1 parent 849ada4 commit ed49951
Show file tree
Hide file tree
Showing 12 changed files with 186 additions and 154 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"solidity.compileUsingRemoteVersion": "v0.8.20+commit.a1b79de6"
"solidity.compileUsingRemoteVersion": "v0.8.20+commit.a1b79de6",
"cSpell.words": ["logirent", "rainbowkit"]
}
1 change: 0 additions & 1 deletion config/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const AppMetaData: Metadata = {
{ rel: 'apple-touch-icon', url: AppleTouchIcon.src },
],
manifest: '/meta/site.webmanifest',
themeColor: '#ffffff',
other: {
'msapplication-TileColor': '#da532c',
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"framer-motion": "^10.16.4",
"lokijs": "^1.5.12",
"lucide-react": "^0.320.0",
"next": "13.4.19",
"next": "14.1.0",
"next-sanity": "7",
"pino-pretty": "^10.2.0",
"postcss": "8.4.29",
Expand All @@ -44,7 +44,7 @@
"react-icons": "^4.11.0",
"react-intersection-observer": "^9.5.2",
"react-spinners": "^0.13.8",
"sanity": "3",
"sanity": "^3.30.0",
"styled-components": "^6.1.8",
"tailwind-merge": "^2.2.1",
"tailwindcss": "3.3.3",
Expand Down
249 changes: 125 additions & 124 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions src/app/explorer/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ export default function Page({ params }: { params: { slug: string } }) {
// console.log(data)
setData(data)
}
console.log(data?.cat)


useEffect(() => {
fetchPosts()
Expand Down
Binary file removed src/app/favicon.ico
Binary file not shown.
10 changes: 7 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import './globals.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import { AppMetaData } from '@config/app'
import '@rainbow-me/rainbowkit/styles.css'
import Nav from '@/components/Nav'
import Footer from '@/components/ui/footer'
const inter = Inter({ subsets: ['latin'] })
export const metadata = AppMetaData

import type { Viewport } from 'next'

//* This view port settings is based on next js 14
export const viewport: Viewport = {
themeColor: '#fff',
}

export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
Expand Down
2 changes: 1 addition & 1 deletion src/components/ExplorerTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ExplorerTab = () => {
const [searchText, setSearchText] = useState<string>("")

return (
<div className=" text-center py-6 flex flex-col items-center gap-6">
<div className=" text-center pb-6 flex flex-col items-center gap-6">
<Search setSearchText={setSearchText} />
<div className='relative w-full '>
{/* <div className='absolute 2xl:hidden top-14 left-5 lg:left-20 text-xs flex gap-2 items-center text-border cursor cursor-pointer font-semibold'> View all <FaAngleDown size={15} className="pt-1" /></div> */}
Expand Down
9 changes: 5 additions & 4 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ import Image from 'next/image'
const Header = () => {
return (
<header
className="min-h-[400px] bg-center bg-cover bg-no-repeat ] relative"
className="min-h-[400px] bg-center bg-cover bg-no-repeat relative"
>

<Image
src="/bg.png"
alt="Decenter ai "
layout="fill"
objectFit="cover"
objectPosition="left"
width={1440}
height={275}
className='max-w-full max-h-full'

/>
<div className=" absolute bg-black/30 inset-0 text-center flex flex-col gap-6 pt-20 pb-8 mx-auto">
<h1 className="text-primary_2 text-center text-3xl sm:text-4xl lg:text-5xl font-logirentBold ">
Expand Down
4 changes: 2 additions & 2 deletions src/components/Nav.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react'
import logo from 'public/dec-logo.png'
// import logo from '/dec-logo.png'
import Image from 'next/image'
import Link from 'next/link'
const Nav = () => {
return (
<div className='w-[90%] md:w-[80%] mx-auto my-4'>
<Link href={"/"}><Image src={logo} alt="DecenterAi logo" /></Link>
<Link href={"/"}><Image src={"/dec-logo.png"} width={200} height={100} alt="DecenterAi logo" /></Link>
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/aiCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function AiCard({ detail }: { detail: any }) {
<div className='max-w-[200px] h-[220px] flex flex-col border px-6 py-4 rounded-3xl gap-3 border-primary_11 '>
<div className='h-[70%]'>
{/* @ts-ignore */}
<Image className='min-h-full min-w-full' alt='' layout='intrinsic' priority width={154} height={144} src={urlFor(detail.mainImage).url()} />
<Image className='min-h-full min-w-full' alt='' priority width={154} height={144} src={urlFor(detail.mainImage).url()} />
</div>
<div className='flex gap-2 flex-col h-[30%] items-start'>
<div className=' '>
Expand Down
54 changes: 41 additions & 13 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -15,20 +19,44 @@
"incremental": true,
"plugins": [
{
"name": "next",
},
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"],
"@Components/*": ["./src/components/*"],
"@Svg/*": ["./src/svg/*"],
"@public/*": ["./public/*"],
"@utils/*": ["./utils/*"],
"@enums/*": ["./enums/*"],
"@config/*": ["./config/*"],
"@abi/*": ["./src/abi/*"],
"@/*": [
"./src/*"
],
"@Components/*": [
"./src/components/*"
],
"@Svg/*": [
"./src/svg/*"
],
"@public/*": [
"./public/*"
],
"@utils/*": [
"./utils/*"
],
"@enums/*": [
"./enums/*"
],
"@config/*": [
"./config/*"
],
"@abi/*": [
"./src/abi/*"
]
},
"forceConsistentCasingInFileNames": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"],
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
}

0 comments on commit ed49951

Please sign in to comment.