-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63eca64
commit 335083c
Showing
18 changed files
with
174 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Chart } from './assets/Chart' | ||
import { Table } from './assets/Table' | ||
export const LeaderBoard = () => { | ||
return ( | ||
<div className='flex flex-col rounded-2xl justify-start items-start mt-6 sm:h-full h-full w-full bg-base-200 overflow-scroll scroll'> | ||
<div className="flex justify-start items-start pl-2 pt-2 sm:pl-12 sm:pt-12 gap-x-4"> | ||
<Chart/> <span className='font-montserrat'>Leader Board </span> | ||
|
||
</div> | ||
<Table /> | ||
</div> | ||
) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export const Button = () => { | ||
return ( | ||
|
||
<div className="flex absolute justify-center items-center left-[40%] sm:left-[41.4%] top-[60%] sm:top-3/4 w-[22vw] sm:w-[17.5vw]"> | ||
<span className="absolute text-white font-montserrat text-[1.4vw]">PLAY NOW</span> | ||
<svg width="211" height="57" viewBox="0 0 211 57" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<rect x="0.84375" width="209.158" height="57" rx="6" fill="url(#paint0_linear_377_5387)"/> | ||
|
||
<defs> | ||
<linearGradient id="paint0_linear_377_5387" x1="105.423" y1="0" x2="105.423" y2="57" gradientUnits="userSpaceOnUse"> | ||
<stop stopColor="#7940CF"/> | ||
<stop offset="1" stopColor="#5921CB"/> | ||
</linearGradient> | ||
</defs> | ||
|
||
</svg> | ||
|
||
</div> | ||
) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const Chart = () => { | ||
return ( | ||
|
||
<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M16.8694 0C20.7805 0 22.9885 2.21835 23 6.1295V16.8705C23 20.7805 20.7805 23 16.8694 23H6.1295C2.21835 23 0 20.7805 0 16.8705V6.1295C0 2.21835 2.21835 0 6.1295 0H16.8694ZM12.075 4.7495C11.7519 4.554 11.3609 4.554 11.0515 4.7495C10.7399 4.94385 10.5685 5.3015 10.6019 5.658V17.3765C10.6605 17.871 11.0734 18.239 11.5564 18.239C12.052 18.239 12.4649 17.871 12.5109 17.3765V5.658C12.5569 5.3015 12.3855 4.94385 12.075 4.7495ZM6.7045 8.5215C6.394 8.326 6.00185 8.326 5.6925 8.5215C5.38085 8.717 5.2095 9.07235 5.244 9.43V17.3765C5.28885 17.871 5.70285 18.239 6.19735 18.239C6.693 18.239 7.10585 17.871 7.15185 17.3765V9.43C7.1875 9.07235 7.01385 8.717 6.7045 8.5215ZM17.3524 12.696C17.043 12.5005 16.652 12.5005 16.33 12.696C16.0184 12.8915 15.847 13.2354 15.893 13.6045V17.3765C15.939 17.871 16.3519 18.239 16.8475 18.239C17.3305 18.239 17.7434 17.871 17.802 17.3765V13.6045C17.8354 13.2354 17.664 12.8915 17.3524 12.696Z" fill="white"/> | ||
</svg> | ||
|
||
) | ||
} |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { Trophy } from './Trophy' | ||
import { useState,useEffect } from 'react' | ||
|
||
const [users, setUsers] = useState<any | undefined>([]) | ||
|
||
useEffect( () => { | ||
const fetchdata = async() =>{ | ||
let response = await fetch(`https://randomuser.me/api/`) | ||
let data = await response.json() | ||
console.log(data) | ||
if (data) | ||
setUsers((users) => ...users , data) | ||
} | ||
fetchdata().catch(console.error) | ||
},[]) | ||
|
||
export const Table = () => | ||
{ | ||
return ( | ||
<div className="overflow-x-auto w-full"> | ||
<table className=" table w-full"> | ||
<thead> | ||
<tr className=' w-[80vw] flex justify-between px-10 items-center '> | ||
<th>Place</th> | ||
<th>User</th> | ||
<th>Score</th> | ||
</tr> | ||
</thead> | ||
<tbody className='flex flex-col justify-center items-center content-center gap-4'> | ||
<tr className='bg-base-100 border-base-200 rounded-3xl w-[80vw] flex justify-between px-10 items-center '> | ||
<td> | ||
<div className="flex items-center space-x-3 "> | ||
<div className='flex justify-center items-center gap-x-3'> | ||
<Trophy/> | ||
|
||
|
||
</div> | ||
</div> | ||
</td> | ||
<td className='flex justify-start items-center gap-x-2'> | ||
<div className="avatar"> | ||
<div className="mask mask-squircle w-12 h-12"> | ||
<img src="https://daisyui.com//[email protected]" alt="Avatar Tailwind CSS Component" /> | ||
</div> | ||
</div> | ||
<div className="flex font-montserrat ">wadie </div> | ||
</td> | ||
<td> | ||
24 | ||
</td> | ||
</tr> | ||
|
||
</tbody> | ||
|
||
</table> | ||
</div> | ||
) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const Trophy = () => { | ||
return ( | ||
|
||
<svg width="31" height="30" viewBox="0 0 31 30" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M25.0906 2.90323C25.1875 1.93548 25.1875 1.06452 25.1875 0H5.8125C5.8125 1.06452 5.8125 1.93548 5.90938 2.90323H0V3.87097C0 12.4839 10.9469 18.5806 13.5625 19.9355V23.2258C13.5625 24.871 12.3031 26.129 10.6563 26.129H8.71875V30H22.2812V26.129H20.3438C18.6969 26.129 17.4375 24.871 17.4375 23.2258V19.9355C20.0531 18.5806 31 12.4839 31 3.87097V2.90323H25.0906ZM2.03438 4.83871H6.10313C6.49063 9.19355 7.55625 12.2903 8.71875 14.5161C5.61875 12.0968 2.42188 8.70968 2.03438 4.83871ZM22.3781 14.5161C23.5406 12.2903 24.6063 9.19355 24.9938 4.83871H29.0625C28.5781 8.70968 25.3813 12.0968 22.3781 14.5161Z" fill="#7138CE"/> | ||
</svg> | ||
|
||
) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { FC } from 'react' | ||
import {Layout} from '../Layout/' | ||
import { Button } from './assets/Button' | ||
import Hero from './assets/Hero.png' | ||
import { LeaderBoard } from './LeaderBoard' | ||
export const Home : FC = () : JSX.Element =>{ | ||
return ( | ||
<Layout> | ||
<div className="flex flex-col items-center h-screen w-full sm:gap-y-8 gap-y-2"> | ||
<div className='flex justify-center relative items-start pt-6 h-2/6 max-h-36 sm:max-h-96 w-[100vw] sm:h-3/4 sm:w-[90vw]'> | ||
<img className='object-fit h-full w-full px-12' src={Hero} alt="bg hero" /> | ||
<Button/> | ||
</div> | ||
<div className='flex justify-center relative items-start pt-6 h-3/6 px-12 w-[100vw] sm:h-3/4 sm:w-[90vw]'> | ||
<LeaderBoard/> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</Layout> | ||
) | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.