This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const sortSvg = (column) => | |
| sortColumn === column ? ( | |
| <svg | |
| xmlns="http://www.w3.org/2000/svg" | |
| viewBox="0 0 24 24" | |
| width="24" | |
| height="24" | |
| > | |
| {sortOrder === "asc" ? ( | |
| <path d="M7 10l5 5 5-5z" /> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const sortSvg = (column) => | |
| sortColumn === column ? ( | |
| <svg | |
| xmlns="http://www.w3.org/2000/svg" | |
| viewBox="0 0 24 24" | |
| width="24" | |
| height="24" | |
| > | |
| {sortOrder === "asc" ? ( | |
| <path d="M7 10l5 5 5-5z" /> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const handleSort = (column) => { | |
| if (sortColumn === column) { | |
| setSortOrder(sortOrder === "asc" ? "desc" : "asc"); | |
| } else { | |
| setSortColumn(column); | |
| setSortOrder("asc"); | |
| } | |
| }; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const sortedProducts = [...products].sort((a, b) => { | |
| if (sortColumn) { | |
| if (sortOrder === "asc") { | |
| return a[sortColumn] < b[sortColumn] ? -1 : 1; | |
| } else { | |
| return a[sortColumn] > b[sortColumn] ? -1 : 1; | |
| } | |
| } else { | |
| return 0; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | "use client"; | |
| import { useEffect, useState } from "react"; | |
| import { raleway, roboto } from "./fonts"; | |
| import React from "react"; | |
| export default function Home() { | |
| const products = [ | |
| { | |
| id: 1, | |
| name: "Product 1", | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import localFont from 'next/font/local' | |
| // one font with one weight | |
| const myFont = localFont({ src: './my-font.woff2' }) | |
| // OR one fonts with multiple weight and styles | |
| const roboto = localFont({ | |
| src: [ | |
| { | |
| path: './Roboto-Regular.woff2', | |
| weight: '400', | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | .... | |
| <h1 className={`${raleway} font-semibold`}>The new Begining</h1> | |
| .... | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ... | |
| import { raleway, roboto } from "./fonts"; | |
| ... | |
| ... | |
| return ( | |
| <div> | |
| <h1 className={`${roboto}`}>The new Begining</h1> | |
| <h1 className={`${raleway}`}>The new Begining</h1> | |
| <h1>The new Begining</h1> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { Raleway, Roboto } from "next/font/google"; | |
| const raleway_init = Raleway({ | |
| subsets: ["latin"], | |
| weight: ["600", "400","100"], | |
| }); | |
| const roboto_init = Roboto({ | |
| subsets: ["latin"], | |
| weight: ["400"], | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import type { Metadata } from "next"; | |
| import "./globals.css"; | |
| export const metadata: Metadata = { | |
| title: "Create Next App", | |
| description: "Generated by create next app", | |
| }; | |
| export default function RootLayout({ | |
| children, | 
NewerOlder