File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ const Card = ({
5959 >
6060 { titleText }
6161 </ Text >
62- < Button size = "sm" py = { 0 } px = { 1 } as = { Link } to = { '/ projects/' + icon } >
62+ < Button size = "sm" py = { 0 } px = { 1 } as = { Link } to = { 'projects/' + icon } >
6363 Know More
6464 </ Button >
6565 </ HStack >
Original file line number Diff line number Diff line change 1+ import isEmpty from 'lodash/isEmpty' ;
12import {
23 Navigate ,
34 Outlet ,
@@ -11,6 +12,10 @@ import ArticlesScreen from '../screens/articles/ArticlesScreen';
1112import ProjectsScreen from '../screens/projects/ProjectsScreen' ;
1213import ArticleEditor from '@screens/articleEditor/ArticleEditor' ;
1314
15+ export const BASE_URL = 'secret_path' ;
16+ export const BASE_URL_ROUTE = isEmpty ( BASE_URL ) ? '/' : `/${ BASE_URL } ` ;
17+ export const BASE_NAV_ROUTE = isEmpty ( BASE_URL ) ? '/' : `/${ BASE_URL } /` ;
18+
1419const publicRouter = createBrowserRouter (
1520 createRoutesFromChildren (
1621 < Route
@@ -21,8 +26,8 @@ const publicRouter = createBrowserRouter(
2126 </ >
2227 }
2328 >
24- < Route path = "" element = { < LazyHiderScreen /> } />
25- < Route path = "version2" element = { < LazyHostScreen /> } >
29+ { ! isEmpty ( BASE_URL ) && < Route path = "" element = { < LazyHiderScreen /> } /> }
30+ < Route path = { BASE_URL } element = { < LazyHostScreen /> } >
2631 < Route path = "" element = { < MainScreen /> } />
2732 < Route path = "articles" element = { < ArticlesScreen /> } />
2833 < Route path = "privateRoute" element = { < ArticleEditor /> } />
Original file line number Diff line number Diff line change 11import { Box , Text } from '@chakra-ui/react' ;
22import { HoverBorderGradient } from '@components' ;
3+ import { BASE_URL_ROUTE } from '@router' ;
34import { Link } from 'react-router-dom' ;
45
56const FooterEndText = ( ) => (
67 < Text fontSize = { 'md' } >
78 © { new Date ( ) . getFullYear ( ) } { ' ' }
8- < Link to = { '/' } color = "violet" >
9+ < Link to = { BASE_URL_ROUTE } color = "violet" >
910 Amit Raikwar
1011 </ Link > { ' ' }
1112 | All rights reserved
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { useRef } from 'react';
66import { useTranslation } from 'react-i18next' ;
77import { useLocation , useNavigate } from 'react-router-dom' ;
88import { useMoveToTop } from '@hooks' ;
9+ import { BASE_URL_ROUTE } from '@router' ;
910
1011const NavigationLink = [
1112 {
@@ -82,7 +83,7 @@ const NavigationBar = () => {
8283 alt = { 'logo' }
8384 w = { 8 }
8485 onClick = { ( ) => {
85- navigate ( '/' ) ;
86+ navigate ( BASE_URL_ROUTE ) ;
8687 moveToTop ( ) ;
8788 } }
8889 _hover = { {
@@ -101,7 +102,7 @@ const NavigationBar = () => {
101102 bg = { 'rgba(255, 255, 255, 0.1)' }
102103 backdropFilter = { 'blur(20px)' }
103104 transition = { 'background-color 0.3s' }
104- display = { pathName !== '/' ? 'none' : 'flex' }
105+ display = { pathName !== BASE_URL_ROUTE ? 'none' : 'flex' }
105106 >
106107 { NavigationLink . map ( ( { name, href } ) => (
107108 < LinkButton
@@ -123,7 +124,7 @@ const NavigationBar = () => {
123124 < LinkButton
124125 key = { ArticleLink . name }
125126 text = { t ( ArticleLink . name ) }
126- href = { ArticleLink . href }
127+ href = { BASE_URL_ROUTE + '/' + ArticleLink . href }
127128 fontSize = { 'lg' }
128129 animationOnHover
129130 />
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ const Hider = () => {
1313 alignItems = { 'center' }
1414 >
1515 < Text color = { 'white' } textAlign = { 'center' } fontSize = { '2xl' } >
16- You cannot access this website until you know the person personally 😝
16+ You cannot 🚫access this website until you know the me personally 😝.
17+ < br />
1718 < br />
1819 This is temporary🚧, I will remove this soon⏳.
1920 </ Text >
Original file line number Diff line number Diff line change @@ -5,15 +5,18 @@ import { ProjectItem } from './components';
55import { useEffect , useRef } from 'react' ;
66import { useLocation } from 'react-router-dom' ;
77import { useCursor } from '@components' ;
8+ import { BASE_URL } from '@router' ;
89
910const Projects = ( ) => {
1011 const { setCursorType } = useCursor ( ) ;
1112 const location = useLocation ( ) ;
12- const secondName = location . pathname . split ( '/' ) [ 2 ] ;
13+ const name = location . pathname . split ( '/' ) ;
14+
15+ const projectName = name [ 1 ] === BASE_URL ? name [ 3 ] : name [ 2 ] ;
1316 const ref = useRef ( null ) ;
1417
1518 const filteredProjects = PROJECT_DATA . filter ( ( project ) =>
16- project . icon === secondName ? project : null ,
19+ project . icon === projectName ? project : null ,
1720 ) ;
1821
1922 useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments