File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import Cart from "./src/components/Cart";
99import Error from "./src/components/Error" ;
1010import { createBrowserRouter , RouterProvider , Outlet } from "react-router-dom" ;
1111import RestaurantMenu from "./src/components/RestaurantMenu" ;
12+ import Profile from "./src/components/Profile" ;
1213
1314const AppLayout = ( ) => {
1415 return (
@@ -34,6 +35,12 @@ const appRouter = createBrowserRouter([
3435 {
3536 path : "/about" ,
3637 element : < About /> ,
38+ children : [
39+ {
40+ path : "profile" ,
41+ element : < Profile /> ,
42+ } ,
43+ ] ,
3744 } ,
3845 {
3946 path : "/contactUs" ,
Original file line number Diff line number Diff line change 1- import React from 'react'
1+ import { Outlet } from "react-router-dom" ;
2+ import React from 'react' ;
23
34 const About = ( ) => {
45 return (
6+ < >
57 < div > About</ div >
8+ < Outlet />
9+ </ >
10+
11+
612 )
713}
814
Original file line number Diff line number Diff line change @@ -3,18 +3,7 @@ import { RestaurantCards } from "../components/RestaurantCards";
33import { useState , useEffect } from "react" ;
44import { Shimmer } from "./Shimmer" ;
55import { Link } from "react-router-dom" ;
6-
7- const filterData = ( searchText , allRestaturants ) => {
8- console . log ( allRestaturants ) ;
9- const data = allRestaturants . filter ( ( restaurant ) => {
10- const resName = restaurant ?. data ?. name
11- ?. toLowerCase ( )
12- . includes ( searchText . toLowerCase ( ) ) ;
13- return resName ;
14- } ) ;
15- // console.log(data + " inside filter data");
16- return data ;
17- } ;
6+ import { filterData } from "../utils/Helper" ;
187
198// function filterData(searchText, restaurant) {
209// const filterData = restaurant.filter((restaurants) =>
Original file line number Diff line number Diff line change 1+ import React from 'react'
2+
3+ const Profile = ( ) => {
4+ return (
5+ < div > Profile</ div >
6+ )
7+ }
8+
9+ export default Profile
Original file line number Diff line number Diff line change 1+ export const filterData = ( searchText , allRestaturants ) => {
2+ console . log ( allRestaturants ) ;
3+ const data = allRestaturants . filter ( ( restaurant ) => {
4+ const resName = restaurant ?. data ?. name
5+ ?. toLowerCase ( )
6+ . includes ( searchText . toLowerCase ( ) ) ;
7+ return resName ;
8+ } ) ;
9+ // console.log(data + " inside filter data");
10+ return data ;
11+ } ;
You can’t perform that action at this time.
0 commit comments