Skip to content

Commit

Permalink
feat: add playground page
Browse files Browse the repository at this point in the history
  • Loading branch information
Shurtu-gal committed Feb 12, 2024
1 parent 5ffc612 commit 1bd663d
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/app/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export default function App() {
<>
<Suspense fallback={<PageLoader />}>
<Routes>
<Route path='/' element={<Pages.Home />} />
<Route exact path='/' element={<Pages.Home />} />
<Route path='/play' element={<Pages.Playground />} />
</Routes>
</Suspense>
</>
Expand Down
29 changes: 27 additions & 2 deletions src/pages/home.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
import { Link } from 'react-router-dom';
import { Button } from '../components/ui/button';

export default function Home() {
return (
<div className='container'>
<Button>Click me</Button>
<div className='container py-6'>
<h1 className='text-3xl font-bold'>1999 Reunion Tour</h1>
<div className='mt-4'>
<h2 className='text-xl font-bold'>How to contribute</h2>
<p>
1. Store content and other data in <code className='bg-gray-200 p-1 rounded-sm'>data</code> folder.
</p>
<p>
2. Store reusable components in <code className='bg-gray-200 p-1'>components</code> folder.
</p>
<p>
3. Store pages in <code className='bg-gray-200 p-1'>pages</code> folder.
</p>
<p>
4. Add custom styles in <code className='bg-gray-200 p-1'>tailwind.config.css</code> file.
</p>
<p>
5. Add shared ui in <code className='bg-gray-200 p-1'>ui</code> folder.
</p>
<p>
6. Add images and other assets in <code className='bg-gray-200 p-1'>assets</code> folder.
</p>
</div>
<Link to='/play'>
<Button>Go to playground</Button>
</Link>
</div>
);
}
1 change: 1 addition & 0 deletions src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ import { lazy } from 'react';

export default {
Home: lazy(() => import('./home')),
Playground: lazy(() => import('./playground')),
};
7 changes: 7 additions & 0 deletions src/pages/playground.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Playground() {
return (
<div className='container py-6'>
<h1 className='text-3xl font-bold'>Playground</h1>
</div>
);
}
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('tailwindcss').Config} */
export default {
darkMode: ['class'],
content: ['./pages/**/*.{ts,tsx}', './components/**/*.{ts,tsx}', './app/**/*.{ts,tsx}', './src/**/*.{ts,tsx}'],
content: ['./src/pages/**/*.{js,jsx}', './src/components/**/*.{js,jsx}', './src/app/**/*.{js,jsx}'],
prefix: '',
theme: {
container: {
Expand Down

0 comments on commit 1bd663d

Please sign in to comment.