From 87b43e6bdbca233803f9136d0dfa8d617b4ee915 Mon Sep 17 00:00:00 2001 From: SirSaltyy <104849031+SirSaltyy@users.noreply.github.com> Date: Thu, 5 May 2022 22:20:18 -0400 Subject: [PATCH] Add link to twitter with svg icon to the sidebar and profile menu. Remove Discord hero icon and replace it with discord svg. (#135) --- web/components/nav/profile-menu.tsx | 2 ++ web/components/nav/sidebar.tsx | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/web/components/nav/profile-menu.tsx b/web/components/nav/profile-menu.tsx index 71c9fc47..994f8bc1 100644 --- a/web/components/nav/profile-menu.tsx +++ b/web/components/nav/profile-menu.tsx @@ -13,6 +13,7 @@ export function getNavigationOptions(user?: User | null) { return [ { name: 'Leaderboards', href: '/leaderboards' }, { 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: 'Leaderboards', href: '/leaderboards' }, { name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' }, + { name: 'Twitter', href: 'https://twitter.com/ManifoldMarkets' }, { name: 'About', href: 'https://docs.manifold.markets' }, { name: 'Sign out', href: '#', onClick: () => firebaseLogout() }, ] diff --git a/web/components/nav/sidebar.tsx b/web/components/nav/sidebar.tsx index 2d5ae49b..4fef69f4 100644 --- a/web/components/nav/sidebar.tsx +++ b/web/components/nav/sidebar.tsx @@ -22,6 +22,13 @@ import { MenuButton } from './menu' import { getNavigationOptions, ProfileSummary } from './profile-menu' 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 + } +} + const navigation = [ { name: 'Home', href: '/home', icon: HomeIcon }, { name: 'Explore', href: '/markets', icon: SearchIcon }, @@ -39,7 +46,8 @@ const signedOutNavigation = [ const signedOutMobileNavigation = [ { name: 'Charity', href: '/charity', icon: HeartIcon }, { 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 }, ]