mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 22:16:54 +00:00
moved navigation to use react router dom
This commit is contained in:
1 parent
1d4faa4bf9
commit
23e4da2007
2 files changed
+24
-4
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import { BottomNavigation, BottomNavigationAction } from "@material-ui/core";
|
||||
import HomeIcon from "@material-ui/icons/Home";
|
||||
@@ -20,9 +21,21 @@ export function TwitterBottomNavigation({ activePage, handleChange }) {
|
||||
onChange={handleChange}
|
||||
className={classes.root}
|
||||
>
|
||||
<BottomNavigationAction icon={<HomeIcon />} />
|
||||
<BottomNavigationAction icon={<SearchIcon />} />
|
||||
<BottomNavigationAction icon={<ProfileIcon />} />
|
||||
<BottomNavigationAction
|
||||
component={Link}
|
||||
to="/twitter"
|
||||
icon={<HomeIcon />}
|
||||
/>
|
||||
<BottomNavigationAction
|
||||
component={Link}
|
||||
to="/twitter/search"
|
||||
icon={<SearchIcon />}
|
||||
/>
|
||||
<BottomNavigationAction
|
||||
component={Link}
|
||||
to="/twitter/profile"
|
||||
icon={<ProfileIcon />}
|
||||
/>
|
||||
</BottomNavigation>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Switch, Route } from "react-router-dom";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
|
||||
import Nui from "../../../os/nui-events/utils/Nui";
|
||||
@@ -70,7 +71,13 @@ export const TwitterApp = () => {
|
||||
<AddTweetModal />
|
||||
<div className={modalVisible ? classes.backgroundModal : null} />
|
||||
<TwitterTitle />
|
||||
<AppContent>{PAGE_COMPONENT_MAPPING[activePage]}</AppContent>
|
||||
<AppContent>
|
||||
<Switch>
|
||||
<Route path="/twitter" exact component={TweetListContainer} />
|
||||
<Route path="/twitter/search" component={TwitterSearch} />
|
||||
<Route path="/twitter/profile" component={TwitterProfile} />
|
||||
</Switch>
|
||||
</AppContent>
|
||||
{showTweetButton && <TweetButton openModal={openModal} />}
|
||||
<AlertBar />
|
||||
<BottomNavigation
|
||||
|
||||
Reference in new issue
Block a user