test background switchup
This commit is contained in:
parent
fc0e5395cf
commit
14f3eabd9b
|
@ -1,5 +1,7 @@
|
|||
"use client";
|
||||
|
||||
import React, { ReactNode, useEffect, useState } from "react";
|
||||
import { useTheme } from "next-themes";
|
||||
import React, { ReactNode } from "react";
|
||||
import Image from "next/image";
|
||||
|
||||
const Background = ({
|
||||
|
@ -9,14 +11,14 @@ const Background = ({
|
|||
children: ReactNode;
|
||||
className?: string;
|
||||
}) => {
|
||||
// const { theme } = useTheme();
|
||||
const { theme } = useTheme();
|
||||
|
||||
return (
|
||||
<div
|
||||
className={"h-full relative w-full bg-center bg-no-repeat bg-cover bg-fixed flex flex-col " + className}
|
||||
>
|
||||
<Image
|
||||
src={"/images/gradient.webp"}
|
||||
src={theme == "dark" ? "/images/gradient.webp": "/images/gradient.webp"}
|
||||
alt="background"
|
||||
layout="fill"
|
||||
objectFit="cover"
|
||||
|
|
Loading…
Reference in New Issue