diff --git a/src/App.jsx b/src/App.jsx index 86df210..fb4e769 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,6 +3,9 @@ import Navbar from './components/Navbar'; import Home from './pages/Home'; import Test from './pages/Test'; import Footer from './components/Footer'; +import ErrorPage from './pages/Error'; +import TopPicks from './pages/TopPicks'; + function App() { return (
@@ -11,8 +14,10 @@ function App() { } /> - } /> + } /> + } /> {/* */} + } />
-
-

Top Picks

-
-
- {limitedTopPicksList.map((item) => ( - -
-
- {item.name} -
-
-
- ))} -
-
diff --git a/src/pages/TopPicks.jsx b/src/pages/TopPicks.jsx new file mode 100644 index 0000000..d31f2f6 --- /dev/null +++ b/src/pages/TopPicks.jsx @@ -0,0 +1,55 @@ +import { Tooltip } from '@nextui-org/react'; +import { landscapesList } from '../data/list/landscapes-list'; +import { paintingsList } from '../data/list/paintings-list'; +import { portraitsList } from '../data/list/portraits-list'; +import { abstractsList } from '../data/list/abstracts-list'; + +const Top = () => { + // Combine all lists + const combinedList = [ + ...landscapesList, + ...paintingsList, + ...portraitsList, + ...abstractsList, + ]; + + // Sort the combined list based on the "likes" attribute in descending order + const sortedList = combinedList.sort((a, b) => b.likes - a.likes); + + // Limit the number of items to show in the Top Picks section + const limitedTopPicksList = sortedList.slice(0, 18); + + return ( +
+
ArtistryHub.
+

Explore our world of creative designs.

+ +
+

Top Picks

+
+
+ {limitedTopPicksList.map((item) => ( + +
+
+ {item.name} +
+
+
+ ))} +
+
+
+ ); +}; + +export default Top;