Например, если я открою эту ссылку https://cubeacloud.com/
, она откроется легко, но если я нацелюсь на эту указанную c ссылку https://cubeacloud.com/contact
, она выдаст ошибку 404 (откройте 2-ю ссылку в личной вкладке). Я попробовал все вещи в маршрутизации
Код маршрутизации приведен ниже
import react from 'react';
import { Switch, Route, Router, BrowserRouterProps } from 'react-router-dom';
import LandingPage from './landingpage';
import AboutMe from './aboutme';
import Contact from './contact';
//projects
import Projects from './projects/projects';
import Graphics from './projects/graphics';
import Content from './projects/contant';
import Nav from '../navbar';
// import Resume from './resume';
//blogs
import Blogs from './blogs/blog';
import CryptoBlogs from './blogs/crypto';
import GamesBlogs from './blogs/games';
import ItBlogs from './blogs/it'
import EducationBlogs from './blogs//education'
//education
import Education from './education/education';
import Books from './education/books';
import Videos from './education/videos';
import Quiz from './education/quiz'
import Courses from './education/courses'
const Main = () => (
<Switch>
<Route exact path={process.env.PUBLIC_URL + '/'} component={LandingPage} />
<Route path="/aboutme" component={AboutMe} />
<Route path="/contact" component={Contact} />
{/* All Projects */}
<Route path="/projects/projects" component={Projects} />
<Route path="/projects/graphics" component={Graphics} />
<Route path="/projects/content" component={Content} />
{/* <Route path="/blog" component={Blogs} /> */}
{/* All Education */}
<Route path="/education/education" component={Education} />
<Route path="/education/books" component={Books} />
<Route path="/education/videos" component={Videos} />
<Route path="/education/courses" component={Courses} />
<Route path="/education/quiz" component={Quiz} />
{/* All Blogs */}
<Route path="/blogs/blog" component={Blogs} />
<Route path="/blogs/crypto" component={CryptoBlogs} />
<Route path="/blogs/education" component={EducationBlogs} />
<Route path="/blogs/it" component={ItBlogs} />
<Route path="/blogs/games" component={GamesBlogs} />
</Switch>
)
export default Main;