Skip to content

Commit

Permalink
Merge pull request #45 from jazicorn/dev
Browse files Browse the repository at this point in the history
fixed missing route component from code route
  • Loading branch information
jazicorn authored Oct 3, 2023
2 parents fa74028 + 61c7ee5 commit 7888c8d
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 36 deletions.
22 changes: 12 additions & 10 deletions apps/web/src/components/dashboard/dashboard-code/D_Console.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const D_Console = () => {

return (
<main className={`${darkMode ? 'tw-bg-campfire-neutral-600 tw-opacity-70 ' : 'tw-bg-campfire-neutral-300 tw-opacity-70 '}
tw-text-campfire-blue tw-w-full tw-h-full tw-flex tw-flex-col tw-p-2 tw-overflow-y-auto tw-items-between`}>
tw-text-campfire-blue tw-w-full tw-h-full tw-flex tw-flex-col tw-overflow-y-auto tw-items-between`}>
<Transition>
<header className={`${darkMode ? '' : ''}
tw-flex tw-flex-row tw-justify-between tw-content-center tw-pb-2`}>
Expand All @@ -58,15 +58,17 @@ const D_Console = () => {
</button>
</header>
</Transition>
{ message !== undefined &&
<ul className="tw-max-h-[100px] tw-pl-2">
{
message.map((item, i) => {
return <li key={i}>{item}</li>;
})
}
</ul>
}
<div className="tw-px-4 tw-pb-2">
{ message !== undefined &&
<ul className="tw-max-h-[100px]">
{
message.map((item, i) => {
return <li key={i}>{item}</li>;
})
}
</ul>
}
</div>
</main>
)
}
Expand Down
22 changes: 11 additions & 11 deletions apps/web/src/components/dashboard/dashboard-code/D_Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,23 +275,23 @@ const D_Editor = () => {
{code === undefined ?
"loading"
:
<div className={`${darkMode ? '' : ''} tw-flex tw-flex-col tw-h-full`}>
<CodeMirror
value={editor}
height={isMobile ? "250px" : "300px"}
maxHeight="100%"
theme={darkMode ? materialDark : githubLight }
extensions={extensions}
onChange={onChange}
/>
</div>
<div className={`${darkMode ? '' : ''} tw-flex tw-flex-col tw-h-full tw-pb-2`}>
<CodeMirror
value={editor}
height={isMobile ? "300px" : "300px"}
maxHeight="100%"
theme={darkMode ? materialDark : githubLight }
extensions={extensions}
onChange={onChange}
/>
</div>
}
</Transition2>
<Transition2>
<div className={`${darkMode ? '' : ''} tw-flex tw-flex-row tw-justify-between tw-content-center tw-h-[36px]`}>
<button
onClick={(e) => onSubmission(e)}
className={`${darkMode ? 'hover:tw-bg-campfire-neutral-500' : 'hover:tw-bg-campfire-neutral-100'} tw-border-campfire-purple-light tw-border-t tw-font-gro tw-w-full tw-h-full hover:tw-text-campfire-purple-light hover:tw-border-b`}
className={`${darkMode ? 'hover:tw-bg-campfire-neutral-500' : 'hover:tw-bg-campfire-neutral-100'} tw-border-campfire-purple-light tw-border-t tw-font-gro tw-w-full tw-h-full hover:tw-text-campfire-purple-light tw-border-b`}
>
Submit
</button>
Expand Down
13 changes: 8 additions & 5 deletions apps/web/src/layout/Layout.D_Code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ const Layout_D_Code = () => {

/** Retrieve Category Based Question */
const getQuestion = useCallback(async (url) => {
/** Retrieve Question from API */
try {
/** Retrieve Question from API */
try {
const result = await fetch(url, {
method: 'GET',
headers: {
Expand Down Expand Up @@ -137,15 +137,18 @@ const Layout_D_Code = () => {
tw-grid tw-grid-rows-layout-dashboard-code-mobile tw-grid-cols-layout-dashboard-code-mobile tw-gap-1 [&>*]:tw-rounded tw-border tw-border-transparent`}>
{/** z index can't go higher than 50 to work*/}
<section className='tw-row-start-1 tw-row-end-1'>
<D_Scoreboard/>
<D_Route/>
</section>
<section className='tw-row-start-2 tw-row-end-2'>
<D_Scoreboard/>
</section>
<section className='tw-row-start-3 tw-row-end-3'>
<D_Problem/>
</section>
<section className='tw-row-start-3 tw-row-end-3'>
<section className='tw-row-start-4 tw-row-end-4'>
<D_Editor/>
</section>
<section className='tw-row-start-4 tw-row-end-4 tw-p-2'>
<section className='tw-row-start-5 tw-row-end-5 tw-p-2'>
<D_Console/>
</section>
</main>
Expand Down
14 changes: 7 additions & 7 deletions apps/web/src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const Dashboard = () => {
<div className={`${ darkMode ? 'tw-bg-[url(../assets/bg/sw-1.jpg),_url(../assets/bg/landscape.jpg)] tw-bg-blend-overlay tw-opacity-40' : 'tw-bg-[url(../assets/bg/sw-1.jpg),_url(../assets/bg/landscape.jpg)] tw-bg-blend-overlay tw-opacity-40'}
tw-fixed tw-bg-cover tw-bg-center tw-bg-no-repeat tw-h-full tw-w-full`}/>
{/**Page Content | Position: Relative */}
<article className={`${isDesktopMDXL || isDesktopXL ? 'tw-min-w-[51.2em]' : 'tw-min-w-[28.5em]'} tw-relative tw-z-10 tw-w-full tw-h-screen tw-flex tw-flex-col tw-grow tw-place-items-center tw-font-space_mono`}>
<article className={`${isDesktopMDXL || isDesktopXL ? 'tw-min-w-[51.2em]' : 'tw-min-w-[28.5em]'} tw-relative tw-z-10 tw-w-full tw-h-full tw-flex tw-flex-col tw-grow tw-place-items-center tw-font-space_mono`}>
<Header />
{path !== '/learn' && <D_Header/>}
{isDesktopMDXL || isDesktopXL ?
Expand All @@ -220,13 +220,13 @@ const Dashboard = () => {
:
<main className={`${darkMode ? '[&>section]:tw-backdrop-brightness-25 ' : '[&>section]:tw-backdrop-brightness-85'}
tw-grid-rows-dashboard-no-language tw-grid-cols-dashboard tw-bg-transparent tw-pb-5 tw-w-full tw-h-full
[&>*]:tw-backdrop-blur-sm tw-min-h-[34em] tw-grid tw-gap-1 tw-px-5 [&>*]:tw-rounded tw-border tw-border-transparent`}>
<section className={`tw-row-end-2 tw-col-start-1 tw-col-end-1 tw-row-start-1 `}>
[&>*]:tw-backdrop-blur-sm tw-min-h-full tw-grid tw-gap-1 tw-px-5 [&>*]:tw-rounded tw-border tw-border-transparent`}>
<section className={`tw-row-end-2 tw-col-start-1 tw-col-end-1 tw-row-start-1`}>
<D_Navigation/>
</section>
<div className={`tw-row-start-1 tw-row-end-2 tw-col-start-2 tw-col-end-3 `}>
<section className={`tw-row-start-1 tw-row-end-2 tw-col-start-2 tw-col-end-3 `}>
<Outlet/>
</div>
</section>
</main>
}
</div>
Expand All @@ -238,9 +238,9 @@ const Dashboard = () => {
<section className='tw-col-start-1 tw-col-end-1 tw-row-start-1 tw-row-end-1 tw-z-20'>
<D_Navigation_Mobile/>
</section>
<div className='tw-col-start-1 tw-col-end-1 tw-row-start-2 tw-row-end-2'>
<section className='tw-col-start-1 tw-col-end-1 tw-row-start-2 tw-row-end-2'>
<Outlet/>
</div>
</section>
</main>
}
</article>
Expand Down
6 changes: 3 additions & 3 deletions apps/web/tailwind.campfire.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ export default {
'dashboard-no-language-mobile': '3em, 28em, auto, auto, auto',
'layout-dashboard-home': '3.5em, auto',
'layout-dashboard-home-mobile': '3.5em, auto, minmax(20em, auto)',
'layout-dashboard-code': '3.2em, 3.2em, 25em, minmax(15.8em, auto)',
'layout-dashboard-code-mobile': '3em, 3em, minmax(20em, auto), minmax(22em, auto), minmax(18em, auto)',
'layout-dashboard-code-editor': '28.2em, minmax(15.8em, auto)',
'layout-dashboard-code': '3.2em, 3.2em, 25.2em, minmax(15.8em, auto)',
'layout-dashboard-code-mobile': '3em, 3em, minmax(20em, auto), minmax(25.2em, auto), minmax(18em, auto)',
'layout-dashboard-code-editor': '28.3em, minmax(15.8em, auto)',
'layout-dashboard-code-editor-mobile': 'minmax(20em, auto), minmax(22em, auto), minmax(10em, auto)',
'layout-dashboard-categories': '3.2em, 3.2em, auto',
'layout-dashboard-categories-mobile': 'auto',
Expand Down

1 comment on commit 7888c8d

@vercel
Copy link

@vercel vercel bot commented on 7888c8d Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

recodecamp-api – ./apps/api

recodecamp-api.vercel.app
recodecamp-api-jazicorn.vercel.app
recodecamp-api-git-main-jazicorn.vercel.app

Please sign in to comment.