Skip to content

Commit

Permalink
conditional env render
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulia Nicola Pernice committed May 12, 2024
1 parent 7a03ec4 commit 500182b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,14 @@ export default function Header(props) {
small ? "opacity-0" : "opacity-1"
}`}
>
<ThemeToggle />
{process.env.NODE_ENV === "development" && <ThemeToggle />}
</CtrlTC>
<div
className={`hidden fixed lg:block z-40 text-right ${TopPos} ${RightPos}`}
// fixed
>
<MenuLink

{process.env.NODE_ENV === "development" && <MenuLink
to="/cases"
exit={{
length: 0.5,
Expand All @@ -99,8 +100,8 @@ export default function Header(props) {
preventScrollJump
>
Case Histories
</MenuLink>
<MenuLink
</MenuLink>}
{process.env.NODE_ENV === "development" && <MenuLink
to="/works"
exit={{
length: 0.5,
Expand All @@ -112,7 +113,7 @@ export default function Header(props) {
preventScrollJump
>
Works Archive
</MenuLink>
</MenuLink>}
{/* <MenuLink
to="/labs"
exit={{
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ w-screen h-screen fixed top-0 left-0 z-0 text-white dark:text-black dark:sm:text
const Layout = ({ children }) => {
// const { title } = useSiteMetadata()
const [isActive, setActive] = useState("false")
const [isBGVisible, setBGVisible] = useState(true)
const [isBGVisible, setBGVisible] = useState(false)
const location = useLocation()
const prevLocation = usePrevious(location)

Expand Down Expand Up @@ -116,7 +116,7 @@ const Layout = ({ children }) => {
</ContentWrapper>
{/* <Middle /> */}
<Footer />
<button className={`fixed bottom-k1 z-50 left-1/2 -translate-x-1/2`} onClick={toggleBGVisibility}> <EyeOutline size="24" className="transition-colors hover:text-violet-600" /></button>
{process.env.NODE_ENV === "development" && <button className={`fixed bottom-k1 z-50 left-1/2 -translate-x-1/2`} onClick={toggleBGVisibility}> <EyeOutline size="24" className="transition-colors hover:text-violet-600" /></button>}
{isBGVisible && <GeometriCBG />}
</MainContainer>
)
Expand Down

0 comments on commit 500182b

Please sign in to comment.