diff --git a/src/App.tsx b/src/App.tsx index eb089f6..abfc4a8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -67,11 +67,17 @@ export default function App() { return ( - -
- {activeTab === 0 && } - {activeTab === 1 && } -
+ {activeAddress ? ( +
+ +
+ {activeTab === 0 && } + {activeTab === 1 && } +
+
+ ) : ( + + )}
) diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 122c626..7412f63 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,4 +1,4 @@ -import styled from 'styled-components' +// import styled from 'styled-components' // types interface NavItemProps { @@ -11,66 +11,65 @@ interface MyNavbarProps { } // styled components -const StyledNavbar = styled.nav` - background-color: #333; - color: white; - display: flex; - align-items: center; - padding: 1em; -` +// const StyledNavbar = styled.nav` +// background-color: #333; +// color: white; +// display: flex; +// align-items: center; +// padding: 1em; +// ` -const Title = styled.h1` - margin-right: 2em; - font-size: 1.5em; -` +// const Title = styled.h1` +// margin-right: 2em; +// font-size: 1.5em; +// ` -const NavItem = styled.div` - color: white; - margin-right: 1em; - padding: 0.5em 1em; - font-size: 1.2em; - cursor: pointer; - border-radius: 5px; +// const NavItem = styled.div` +// color: white; +// margin-right: 1em; +// padding: 0.5em 1em; +// font-size: 1.2em; +// cursor: pointer; +// border-radius: 5px; - &:hover { - color: #ddd; - background-color: #444; - } +// &:hover { +// color: #ddd; +// background-color: #444; +// } - background-color: ${(props) => (props.active ? '#555' : 'transparent')}; -` +// background-color: ${(props) => (props.active ? '#555' : 'transparent')}; // styled component implementation -export const Navbar = ({ setActiveTab, activeTab }: MyNavbarProps) => { - return ( - - Blockchain Photo Diary - setActiveTab(0)} active={activeTab === 0}> - Mint - - setActiveTab(1)} active={activeTab === 1}> - Gallery - - - ) -} - -// // tailwind implementation // export const Navbar = ({ setActiveTab, activeTab }: MyNavbarProps) => { // return ( -// +// +// Blockchain Photo Diary +// setActiveTab(0)} active={activeTab === 0}> +// Mint +// +// setActiveTab(1)} active={activeTab === 1}> +// Gallery +// +// // ) // } + +// // tailwind implementation +export const Navbar = ({ setActiveTab, activeTab }: MyNavbarProps) => { + return ( + + ) +}