mekasu0124

Untitled

Jul 26th, 2024
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import "../styles/pages/userLibrary.css";
  2. import { useEffect, useState } from 'react';
  3.  
  4. export default function UserLibrary() {
  5.   const [myApps, setMyApps] = useState([]);
  6.  
  7.   useEffect(() => {
  8.     setMyApps([
  9.       {
  10.         id: 1,
  11.         appName: "To-Do",
  12.         appImage: "../assets/images/app-icon.jpg",
  13.         appDetails: "A simple To-Do application that allows the user the abilities of setting reminders and priority levels. jal;kdsjfkl ja;lksdjflk ja;sldkjf;al ksjd;flkja;sl kdjf;alksjd ;flkja;slk djf;l aksjd;lkf ja;lskdjf;lak jsd;lkfj ;als kdjfl;k ajs;ldk jf;laksj d;lfkja;lk djwlei jvlkan s;ldkajf kdjflaksdj vlkajsdlkj flaksjdvl; kajs;dklj v;alskdjv ;lkasjd;vlkajsdl;kv ja;lskdjv;a lksdjv;laksjdlvjoiwejv joivj oaijdlkvja ;sliej vliajsdlkjv",
  14.         appAuthor: "mekasu0124",
  15.         appRepoUrl: "https://github.com/mekasu0124/MeksTodo"
  16.       },
  17.       {
  18.         id: 2,
  19.         appName: "To-Do",
  20.         appImage: "../assets/images/app-icon.jpg",
  21.         appDetails: "A simple To-Do application that allows the user the abilities of setting reminders and priority levels.",
  22.         appAuthor: "mekasu0124",
  23.         appRepoUrl: "https://github.com/mekasu0124/MeksTodo"
  24.       },
  25.       {
  26.         id: 3,
  27.         appName: "To-Do",
  28.         appImage: "../assets/images/app-icon.jpg",
  29.         appDetails: "A simple To-Do application that allows the user the abilities of setting reminders and priority levels.",
  30.         appAuthor: "mekasu0124",
  31.         appRepoUrl: "https://github.com/mekasu0124/MeksTodo"
  32.       },
  33.       {
  34.         id: 4,
  35.         appName: "To-Do",
  36.         appImage: "../assets/images/app-icon.jpg",
  37.         appDetails: "A simple To-Do application that allows the user the abilities of setting reminders and priority levels.",
  38.         appAuthor: "mekasu0124",
  39.         appRepoUrl: "https://github.com/mekasu0124/MeksTodo"
  40.       },
  41.       {
  42.         id: 5,
  43.         appName: "To-Do",
  44.         appImage: "../assets/images/app-icon.jpg",
  45.         appDetails: "A simple To-Do application that allows the user the abilities of setting reminders and priority levels.",
  46.         appAuthor: "mekasu0124",
  47.         appRepoUrl: "https://github.com/mekasu0124/MeksTodo"
  48.       },
  49.       {
  50.         id: 6,
  51.         appName: "To-Do",
  52.         appImage: "../assets/images/app-icon.jpg",
  53.         appDetails: "A simple To-Do application that allows the user the abilities of setting reminders and priority levels.",
  54.         appAuthor: "mekasu0124",
  55.         appRepoUrl: "https://github.com/mekasu0124/MeksTodo"
  56.       },
  57.       {
  58.         id: 7,
  59.         appName: "To-Do",
  60.         appImage: "../assets/images/app-icon.jpg",
  61.         appDetails: "A simple To-Do application that allows the user the abilities of setting reminders and priority levels.",
  62.         appAuthor: "mekasu0124",
  63.         appRepoUrl: "https://github.com/mekasu0124/MeksTodo"
  64.       },
  65.       {
  66.         id: 8,
  67.         appName: "To-Do",
  68.         appImage: "../assets/images/app-icon.jpg",
  69.         appDetails: "A simple To-Do application that allows the user the abilities of setting reminders and priority levels.",
  70.         appAuthor: "mekasu0124",
  71.         appRepoUrl: "https://github.com/mekasu0124/MeksTodo"
  72.       },
  73.       {
  74.         id: 9,
  75.         appName: "To-Do",
  76.         appImage: "../assets/images/app-icon.jpg",
  77.         appDetails: "A simple To-Do application that allows the user the abilities of setting reminders and priority levels.",
  78.         appAuthor: "mekasu0124",
  79.         appRepoUrl: "https://github.com/mekasu0124/MeksTodo"
  80.       }
  81.     ]);
  82.   }, []);
  83.  
  84.   const getApps = () => {
  85.     return myApps.map((app) => {
  86.       return (
  87.         <div className="container card" key={app.id} style={{ backgroundImage: `url(${app.appImage})`}}>
  88.           <div className="container row">
  89.             <h2 id="card-title">{app.appName}</h2>
  90.           </div>
  91.  
  92.           <label id="card-text">Author: {app.appAuthor}</label>
  93.  
  94.           <label id="card-text">GitHub Repo: {app.appRepoUrl}</label>
  95.          
  96.           <label id="card-text">{app.appDetails}</label>
  97.         </div>
  98.       );
  99.     });
  100.   };
  101.  
  102.   return (
  103.     <div className="library-container">
  104.       { getApps() }
  105.     </div>
  106.   );
  107. };
  108.  
Add Comment
Please, Sign In to add comment