Skip to content

Commit b4dff9e

Browse files
committed
fix: remove react.fc
1 parent dae8184 commit b4dff9e

11 files changed

Lines changed: 25 additions & 11 deletions

File tree

dataconnect/app/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import AdvancedSearchPage from "./pages/AdvancedSearch";
1010
import NotFound from "./pages/NotFound";
1111
import RootLayout from "./layout/RootLayout";
1212

13-
const App: React.FC = () => {
13+
const App = () => {
1414
return (
1515
<Router>
1616
<RootLayout>

dataconnect/app/src/components/carousel.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ interface CarouselProps {
1313
}[];
1414
}
1515

16-
const Carousel: React.FC<CarouselProps> = ({ title, movies }) => {
16+
const Carousel = (
17+
{
18+
title,
19+
movies
20+
}: CarouselProps
21+
) => {
1722
return (
1823
<section className="carousel py-8">
1924
<h2 className="text-gray-200 text-2xl font-bold mb-4">{title}</h2>

dataconnect/app/src/components/moviecard.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@ interface MovieCardProps {
1414
tags?: string[] | null;
1515
}
1616

17-
const MovieCard: React.FC<MovieCardProps> = ({ id, title, imageUrl, rating, genre, tags }) => {
17+
const MovieCard = (
18+
{
19+
id,
20+
title,
21+
imageUrl,
22+
rating,
23+
genre,
24+
tags
25+
}: MovieCardProps
26+
) => {
1827
const [user, setUser] = useState<User | null>(null);
1928
const [isFavorited, setIsFavorited] = useState(false);
2029
const auth = useContext(AuthContext);

dataconnect/app/src/components/navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { upsertUser } from '@/lib/dataconnect-sdk';
66
import { FaSearch } from 'react-icons/fa';
77
import firebaseLogo from '@/assets/firebase_logo.svg';
88

9-
const Navbar: React.FC = () => {
9+
const Navbar = () => {
1010
const [user, setUser] = useState<User | null>(null);
1111
const auth = useContext(AuthContext);
1212

dataconnect/app/src/pages/Actor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { onAuthStateChanged, User } from 'firebase/auth';
1212
import { AuthContext } from '@/lib/firebase';
1313
import NotFound from './NotFound';
1414

15-
const ActorPage: React.FC = () => {
15+
const ActorPage = () => {
1616
const { id } = useParams<{ id: string }>();
1717
const actorId = id || '';
1818
const [actor, setActor] = useState<GetActorByIdResponse['actor'] | null>(null);

dataconnect/app/src/pages/AdvancedSearch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { searchAll } from '@/lib/dataconnect-sdk';
66

77
const genres = ['', 'action', 'crime', 'drama', 'sci-fi', 'thriller', 'adventure'];
88

9-
const AdvancedSearchPage: React.FC = () => {
9+
const AdvancedSearchPage = () => {
1010
const [searchQuery, setSearchQuery] = useState('');
1111
const [releaseYearRange, setReleaseYearRange] = useState({ min: 1900, max: 2030 });
1212
const [genre, setGenre] = useState('');

dataconnect/app/src/pages/Genre.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useParams } from 'react-router-dom';
33
import MovieCard from '@/components/moviecard';
44
import { ListMoviesByGenreResponse, listMoviesByGenre } from '@/lib/dataconnect-sdk';
55

6-
const GenrePage: React.FC = () => {
6+
const GenrePage = () => {
77
const { genre } = useParams<{ genre: string }>();
88
const [mostPopular, setMostPopular] = useState<ListMoviesByGenreResponse['mostPopular']>([]);
99
const [mostRecent, setMostRecent] = useState<ListMoviesByGenreResponse['mostRecent']>([]);

dataconnect/app/src/pages/Home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
22
import Carousel from '@/components/carousel';
33
import { listMovies, ListMoviesResponse } from '@/lib/dataconnect-sdk';
44

5-
const HomePage: React.FC = () => {
5+
const HomePage = () => {
66
const [topMovies, setTopMovies] = useState<ListMoviesResponse["movies"]>([]);
77
const [latestMovies, setLatestMovies] = useState<ListMoviesResponse["movies"]>([]);
88

dataconnect/app/src/pages/MyProfile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
import { MdStar } from 'react-icons/md';
1212
import { AuthContext } from '@/lib/firebase';
1313

14-
const MyProfilePage: React.FC = () => {
14+
const MyProfilePage = () => {
1515
const navigate = useNavigate();
1616
const [authUser, setAuthUser] = useState<User | null>(null);
1717
const [user, setUser] = useState<GetCurrentUserResponse['user'] | null>(null);

dataconnect/app/src/pages/NotFound.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { useNavigate } from 'react-router-dom';
33

4-
const NotFound: React.FC = () => {
4+
const NotFound = () => {
55
const navigate = useNavigate();
66

77
return (

0 commit comments

Comments
 (0)