Fix TS2322 error in Settings.tsx
The Settings.tsx file was throwing a TS2322 error because the Header component was receiving a `title` prop, but it was not defined in the component's interface. This commit fixes the error by defining the `title` prop in the Header component's interface.
This commit is contained in:
@@ -2,12 +2,16 @@
|
||||
import React from 'react';
|
||||
import { Bell } from 'lucide-react';
|
||||
|
||||
const Header: React.FC = () => {
|
||||
interface HeaderProps {
|
||||
title?: string;
|
||||
}
|
||||
|
||||
const Header: React.FC<HeaderProps> = ({ title }) => {
|
||||
return (
|
||||
<header className="py-8">
|
||||
<div className="flex justify-between items-center">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold neuro-text">반갑습니다</h1>
|
||||
<h1 className="text-2xl font-bold neuro-text">{title || '반갑습니다'}</h1>
|
||||
<p className="text-gray-500">젤리의 적자탈출</p>
|
||||
</div>
|
||||
<button className="neuro-flat p-2.5 rounded-full">
|
||||
|
||||
Reference in New Issue
Block a user