Skip to content

Commit

Permalink
Fix react router fail to navigate to other page after deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ALPHAAAL committed Mar 16, 2024
1 parent f22566d commit e5375b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
run: npm ci
- name: Build
run: npm run build
- name: Copy index.html to 404.html
run: cp ./dist/index.html ./dist/404.html
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
Expand Down
4 changes: 2 additions & 2 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import {
RouterProvider,
} from "react-router-dom";

import About from './components/About';
import Home from './components/Home'
import Layout from './components/Layout';

import './index.css'
import Layout from './components/Layout';
import About from './components/About';

const router = createBrowserRouter([
{
Expand Down

0 comments on commit e5375b3

Please sign in to comment.