-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add navbar and footer #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
f1cf8b9
style: adjust layout of preview tables for improved responsiveness
ErwanDecoster 2f725d1
refactor: pass className prop to preview table components for better …
ErwanDecoster 122e547
feat: add bellecour chain configuration and injected wallet provider.
ErwanDecoster 5ee9127
feat: add user authentication and avatar selection features
ErwanDecoster 2ef9a14
fix: update favicon to use iexec logo and remove unused react.svg file
ErwanDecoster 5507253
feat: integrate WagmiProvider for improved wallet management
ErwanDecoster ed945d8
refactor: update StatusCell type definitions and improve timestamp ha…
ErwanDecoster ae181c8
fix: move @trivago/prettier-plugin-sort-imports dependency devDepende…
ErwanDecoster 8176f3d
fix: better routing, fixing some bugs
ErwanDecoster 48fb59f
feat: add Radix UI Select component and update styles for popover
ErwanDecoster b55b5a8
fix: remove unused QueryClient import from main.tsx
ErwanDecoster 2bc182e
feat: enhance TopNavBar with responsive menu, account button and prot…
ErwanDecoster 6849c32
feat: add IexecAccount component to TopNavBar with copy functionality
ErwanDecoster 482ec31
style: format Button component for better readability
ErwanDecoster 3201a54
refactor: improve layout and styling of TopNavBar component
ErwanDecoster 64afbff
feat: rename TopNavBar component to Navbar and better responsive
ErwanDecoster cb8beb0
fix: update responsive classes in NavBar for better future layout
ErwanDecoster 58b5d49
feat: rename TopNavBar to Navbar for consistency and clarity
ErwanDecoster 6d72a74
feat: add Footer component with social links and navigation
ErwanDecoster 0b1f443
fix: correct start year in Footer component to 2017
ErwanDecoster 605445e
fix: update label for Blockscout link in Footer component
ErwanDecoster 2320a2e
refactor: remove AddressChip component as it is no longer needed
ErwanDecoster c23e952
style: format profile.module.css by adding spacing for improved reada…
ErwanDecoster e2fe117
fix: update title in index.html to 'iExec Explorer' for consistency
ErwanDecoster 07b49e1
fix: adjust avatar selection logic to ensure consistent image indexing
ErwanDecoster 4b0feef
fix: update dark theme comments to add a TODO for light and dark the…
ErwanDecoster de7aed3
feat: implement useSyncAccountWithUserStore hook for account synchron…
ErwanDecoster b3a23ab
feat: add UnsupportedChain component to handle unsupported blockchain…
ErwanDecoster 3b2c4e5
fix: enhance UnsupportedChain component to handle unsupported chains …
ErwanDecoster c35d330
fix: adjust padding in Footer component for better responsiveness
ErwanDecoster e5c1c37
feat: replace IexecAccount component with AddressChip for address dis…
ErwanDecoster 1a256b7
fix: add iExec Account link in navigation
ErwanDecoster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| VITE_POCO_SUBGRAPH_URL="https://thegraph.iex.ec/subgraphs/name/bellecour/poco-v5" | ||
| VITE_POCO_SUBGRAPH_URL="https://thegraph.iex.ec/subgraphs/name/bellecour/poco-v5" | ||
| VITE_REOWN_PROJECT_ID=b89f75687c01fa0df9e68c903283012d |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| import { cn } from '@/lib/utils'; | ||
| import { | ||
| SiDiscord, | ||
| SiMedium, | ||
| SiTelegram, | ||
| SiX, | ||
| SiYoutube, | ||
| } from '@icons-pack/react-simple-icons'; | ||
| import { Link } from '@tanstack/react-router'; | ||
| import { Linkedin } from 'lucide-react'; | ||
| import iExecLogo from '../assets/iexec-logo.svg'; | ||
| import { Button } from './ui/button'; | ||
|
|
||
| export function Footer({ className }: { className?: string }) { | ||
| const navLinks = [ | ||
| { href: 'https://www.iex.ec/', label: 'iExec Website' }, | ||
| { href: 'https://blockscout-bellecour.iex.ec/', label: 'Block explorer' }, // TODO import it from protocol data list | ||
| { href: 'https://www.iex.ec/contact', label: 'Contact Us' }, | ||
| ]; | ||
|
|
||
| const socialLinks = [ | ||
| { href: 'https://twitter.com/iEx_ec', icon: <SiX size={16} /> }, | ||
| { href: 'https://discord.gg/pbt9m98wnU', icon: <SiDiscord size={16} /> }, | ||
| { href: 'https://t.me/iexec_rlc_official', icon: <SiTelegram size={16} /> }, | ||
| { | ||
| href: 'https://www.youtube.com/channel/UCwWxZWvKVHn3CXnmDooLWtA', | ||
| icon: <SiYoutube size={16} />, | ||
| }, | ||
| { | ||
| href: 'https://www.linkedin.com/company/iex.ec/', | ||
| icon: <Linkedin size={16} />, | ||
| }, | ||
| { href: 'https://medium.com/iex-ec', icon: <SiMedium size={16} /> }, | ||
| ]; | ||
|
|
||
| const startYear = 2017; | ||
| const currentYear = new Date().getFullYear(); | ||
| const displayYear = | ||
| currentYear > startYear | ||
| ? `${startYear} - ${currentYear}` | ||
| : `${currentYear}`; | ||
|
|
||
| return ( | ||
| <footer | ||
| className={cn( | ||
| 'bg-grey-800 border-muted text-grey-200 rounded-3xl border px-6 py-10 sm:px-10 lg:px-20', | ||
| className | ||
| )} | ||
| > | ||
| <div className="grid place-items-center justify-center gap-10 xl:grid-cols-3 xl:place-items-stretch"> | ||
| <Link to="/" className="flex items-center gap-2 font-mono"> | ||
| <img src={iExecLogo} width="25" height="25" alt="iExec logo" /> | ||
| <span className="hidden sm:block">iExec Explorer</span> | ||
| </Link> | ||
|
|
||
| <nav className="flex flex-col items-start gap-4 sm:flex-row sm:items-center sm:gap-4"> | ||
| {navLinks.map(({ href, label }, idx) => ( | ||
| <div key={idx} className="flex items-center gap-2"> | ||
| <Button | ||
| asChild | ||
| variant="link" | ||
| className="text-grey-200 p-2 font-mono" | ||
| > | ||
| <a href={href} target="_blank" rel="noopener noreferrer"> | ||
| {label} | ||
| </a> | ||
| </Button> | ||
| {idx < navLinks.length - 1 && ( | ||
| <span className="bg-grey-200 hidden size-1.5 rounded-full sm:block" /> | ||
| )} | ||
| </div> | ||
| ))} | ||
| </nav> | ||
|
|
||
| <div className="flex items-center xl:justify-end"> | ||
| {socialLinks.map(({ href, icon }, idx) => ( | ||
| <Button | ||
| key={idx} | ||
| asChild | ||
| variant="link" | ||
| className="text-grey-200 p-2" | ||
| > | ||
| <a | ||
| href={href} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| aria-label="Social link" | ||
| > | ||
| {icon} | ||
| </a> | ||
| </Button> | ||
| ))} | ||
| </div> | ||
| </div> | ||
|
|
||
| <hr className="border-grey-500 mt-10 mb-4" /> | ||
| <p className="w-full text-center text-sm"> | ||
| © All Rights Reserved {displayYear} | ||
| </p> | ||
| </footer> | ||
| ); | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import { SUPPORTED_CHAINS } from '@/config'; | ||
| import { Terminal } from 'lucide-react'; | ||
| import useUserStore from '@/stores/useUser.store'; | ||
| import { Alert, AlertDescription, AlertTitle } from './ui/alert'; | ||
|
|
||
| const SUPPORTED_CHAIN_IDS = SUPPORTED_CHAINS.map((chain) => chain.id); | ||
|
|
||
| export function UnsupportedChain() { | ||
| const { isConnected, chainId } = useUserStore(); | ||
|
|
||
| const isChainSupported = | ||
| chainId !== undefined && SUPPORTED_CHAIN_IDS.includes(chainId); | ||
|
|
||
| if (isChainSupported || !isConnected) { | ||
| return null; | ||
| } | ||
|
|
||
| return ( | ||
| <Alert variant="destructive" className="mx-auto mt-8 text-left"> | ||
| <Terminal className="h-4 w-4" /> | ||
| <AlertTitle>Error</AlertTitle> | ||
| <AlertDescription> | ||
| It seems that you are using a chain that is not supported. | ||
| </AlertDescription> | ||
| </Alert> | ||
| ); | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| import clsx from 'clsx'; | ||
| import { useState } from 'react'; | ||
| import { getAvatarVisualNumber } from '@/utils/getAvatarVisualNumber'; | ||
| import { truncateAddress } from '@/utils/truncateAddress'; | ||
| import { Button } from '../ui/button'; | ||
| import { | ||
| Tooltip, | ||
| TooltipContent, | ||
| TooltipProvider, | ||
| TooltipTrigger, | ||
| } from '../ui/tooltip'; | ||
| import avatarStyles from './profile.module.css'; | ||
|
|
||
| export function AddressChip({ address }: { address: string }) { | ||
| const avatarVisualBg = getAvatarVisualNumber({ | ||
| address, | ||
| }); | ||
|
|
||
| const [showTooltip, setShowTooltip] = useState(false); | ||
| const [tooltipMessage, setTooltipMessage] = useState('Copy address'); | ||
|
|
||
| const handleCopy = () => { | ||
| navigator.clipboard.writeText(address).then(() => { | ||
| setTooltipMessage('Address copied!'); | ||
| setShowTooltip(true); | ||
| setTimeout(() => setShowTooltip(false), 2000); | ||
| }); | ||
| }; | ||
|
|
||
| const handleMouseEnter = () => { | ||
| setTooltipMessage('Copy address'); | ||
| setShowTooltip(true); | ||
| }; | ||
|
|
||
| const handleMouseLeave = () => { | ||
| setShowTooltip(false); | ||
| }; | ||
| return ( | ||
| <TooltipProvider delayDuration={0}> | ||
| <Tooltip open={showTooltip}> | ||
| <TooltipTrigger asChild> | ||
| <Button | ||
| className="bg-grey-800 hover:bg-muted text-primary" | ||
| variant="secondary" | ||
| onClick={handleCopy} | ||
| onMouseEnter={handleMouseEnter} | ||
| onMouseLeave={handleMouseLeave} | ||
| > | ||
| <span className="text-sm">{truncateAddress(address)}</span> | ||
| <div | ||
| className={clsx( | ||
| avatarStyles[avatarVisualBg], | ||
| 'relative z-10 size-4 rounded-full bg-black bg-cover' | ||
| )} | ||
| /> | ||
| </Button> | ||
| </TooltipTrigger> | ||
| <TooltipContent side="top" className="max-w-sm"> | ||
| {tooltipMessage} | ||
| </TooltipContent> | ||
| </Tooltip> | ||
| </TooltipProvider> | ||
| ); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.