Skip to content

Commit

Permalink
fix: correct lint and color errors
Browse files Browse the repository at this point in the history
  • Loading branch information
0-vortex committed Nov 23, 2023
1 parent d5a618b commit a691bab
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/(personal)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default async function IndexRoute({
}) {
return (
<>
<div className="flex min-h-screen flex-col">
<div className="flex flex-col min-h-screen">
<Suspense>
<Navbar />
</Suspense>
Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const mono = JetBrains_Mono({
export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en" className={`${mono.variable} ${sans.variable} ${serif.variable}`}>
<body className="bg-neutral-200 dark:bg-stone-900 text-black dark:text-stone-100 min-h-[100dvh]">
<body className="bg-neutral-200 dark:bg-neutral-700 text-black dark:text-stone-100 min-h-[100dvh]">
<ThemeProvider attribute="class" enableSystem>{children}</ThemeProvider>
</body>
</html>
Expand Down
8 changes: 4 additions & 4 deletions components/global/Footer/FooterLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default function Footer(props: FooterProps) {
return (
<footer className={clsx([
'border-t',
'bg-gray-100/90 border-slate-500',
'dark:bg-neutral-800/90 dark:border-black',
'bg-neutral-300 border-slate-500',
'dark:bg-neutral-800 dark:border-black',
])}>
<div className={clsx([
'grid grid-cols-12',
Expand Down Expand Up @@ -135,8 +135,8 @@ export default function Footer(props: FooterProps) {
<div className={clsx([
'col-start-2 col-end-12',
'flex justify-between items-center backdrop-blur border-x',
'bg-gray-100/90 border-slate-500',
'dark:bg-neutral-800/90 dark:border-black',
'border-slate-500',
'dark:border-black',
])}>
<p className="p-8 m-auto font-mono text-md">&copy; 2023 {process.env.NEXT_PUBLIC_SANITY_PROJECT_TITLE}. All rights reserved.</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/global/Navbar/NavbarLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function Navbar(props: NavbarProps) {
return (
<div className={clsx([
'sticky top-0 z-10 border-y grid grid-cols-12',
'bg-gray-100/90 border-slate-500',
'bg-neutral-300/90 border-slate-500',
'dark:bg-neutral-800/90 dark:border-black',
])}>
<div className={clsx([
Expand Down
6 changes: 4 additions & 2 deletions components/pages/home/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { type EncodeDataAttributeCallback } from '@sanity/react-loader/rsc'
import clsx from 'clsx'
import Link from 'next/link'

Expand All @@ -8,17 +9,18 @@ import type { HomePagePayload } from '@/types'

export interface HomePageProps {
data: HomePagePayload | null
encodeDataAttribute?: EncodeDataAttributeCallback
}

export function HomePage({ data }: HomePageProps) {
export function HomePage({ data, encodeDataAttribute }: HomePageProps) {
// Default to an empty object to allow previews on non-existent documents
const { overview = [], showcaseProjects = [], title = '' } = data ?? {}

return (
<div className={clsx([
'p-0'
])}>
{title && <Header centered title={title} description={overview} />}
{title && <Header data-sanity={encodeDataAttribute?.('title')} centered title={title} description={overview} />}

{showcaseProjects && showcaseProjects.length > 0 && (
<div className="mx-auto max-w-[100rem] grid grid-cols-2 flex-wrap gap-6 py-6">
Expand Down
3 changes: 2 additions & 1 deletion components/pages/home/HomePagePreview.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import { type QueryResponseInitial } from '@sanity/react-loader/rsc'
import { EncodeDataAttributeCallback,type QueryResponseInitial } from '@sanity/react-loader/rsc'

import { homePageQuery } from '@/sanity/lib/queries'
import { useQuery } from '@/sanity/loader/useQuery'
Expand All @@ -10,6 +10,7 @@ import HomePage from './HomePage'

type Props = {
initial: QueryResponseInitial<HomePagePayload | null>
encodeDataAttribute?: EncodeDataAttributeCallback
}

export default function HomePagePreview(props: Props) {
Expand Down
1 change: 1 addition & 0 deletions sanity/loader/useQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const useQuery = <
const snapshot = queryStore.useQuery<QueryResponseResult, QueryResponseError>(
query,
params,
// @ts-ignore
options,
)

Expand Down

0 comments on commit a691bab

Please sign in to comment.