Add link to twitter with svg icon to the sidebar and profile menu. Remove Discord hero icon and replace it with discord svg. (#135)

This commit is contained in:
SirSaltyy 2022-05-05 22:20:18 -04:00 committed by GitHub
parent e41f646b42
commit 87b43e6bdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -13,6 +13,7 @@ export function getNavigationOptions(user?: User | null) {
return [ return [
{ name: 'Leaderboards', href: '/leaderboards' }, { name: 'Leaderboards', href: '/leaderboards' },
{ name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' }, { name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' },
{ name: 'Twitter', href: 'https://twitter.com/ManifoldMarkets' },
] ]
} }
@ -20,6 +21,7 @@ export function getNavigationOptions(user?: User | null) {
{ name: 'Add funds', href: '/add-funds' }, { name: 'Add funds', href: '/add-funds' },
{ name: 'Leaderboards', href: '/leaderboards' }, { name: 'Leaderboards', href: '/leaderboards' },
{ name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' }, { name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' },
{ name: 'Twitter', href: 'https://twitter.com/ManifoldMarkets' },
{ name: 'About', href: 'https://docs.manifold.markets' }, { name: 'About', href: 'https://docs.manifold.markets' },
{ name: 'Sign out', href: '#', onClick: () => firebaseLogout() }, { name: 'Sign out', href: '#', onClick: () => firebaseLogout() },
] ]

View File

@ -22,6 +22,13 @@ import { MenuButton } from './menu'
import { getNavigationOptions, ProfileSummary } from './profile-menu' import { getNavigationOptions, ProfileSummary } from './profile-menu'
import { useHasCreatedContractToday } from '../../hooks/use-has-created-contract-today' import { useHasCreatedContractToday } from '../../hooks/use-has-created-contract-today'
// Create an icon from the url of an image
function IconFromUrl(url: string): React.ComponentType<{ className?: string }> {
return function Icon(props) {
return <img src={url} className={clsx(props.className, 'h-6 w-6')} />
}
}
const navigation = [ const navigation = [
{ name: 'Home', href: '/home', icon: HomeIcon }, { name: 'Home', href: '/home', icon: HomeIcon },
{ name: 'Explore', href: '/markets', icon: SearchIcon }, { name: 'Explore', href: '/markets', icon: SearchIcon },
@ -39,7 +46,8 @@ const signedOutNavigation = [
const signedOutMobileNavigation = [ const signedOutMobileNavigation = [
{ name: 'Charity', href: '/charity', icon: HeartIcon }, { name: 'Charity', href: '/charity', icon: HeartIcon },
{ name: 'Leaderboards', href: '/leaderboards', icon: CakeIcon }, { name: 'Leaderboards', href: '/leaderboards', icon: CakeIcon },
{ name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh', icon: ChatIcon }, { name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh', icon: IconFromUrl("/discord-logo.svg") },
{ name: 'Twitter', href: 'https://twitter.com/ManifoldMarkets', icon: IconFromUrl("/twitter-logo.svg") },
{ name: 'About', href: 'https://docs.manifold.markets', icon: BookOpenIcon }, { name: 'About', href: 'https://docs.manifold.markets', icon: BookOpenIcon },
] ]