CLASSROOMIO-T-97: Better button style and fix route not found

This commit is contained in:
Rotimi Best
2023-08-05 05:48:32 +01:00
parent d542a4f7e3
commit 2cd8b7cf69
3 changed files with 11 additions and 12 deletions
+2 -2
View File
@@ -26,10 +26,10 @@
function getPathName(_isCoursePage) { function getPathName(_isCoursePage) {
if (!_isCoursePage) { if (!_isCoursePage) {
return $currentOrgPath; return $currentOrgPath ?? '/';
} }
return `${$currentOrgPath}/courses`; return $currentOrgPath ? `${$currentOrgPath}/courses` : '';
} }
</script> </script>
@@ -21,8 +21,8 @@
: 'cursor-pointer'} flex items-center h-auto {VARIANTS_CLASS[ : 'cursor-pointer'} flex items-center h-auto {VARIANTS_CLASS[
isLoading ? VARIANTS.OUTLINED : variant isLoading ? VARIANTS.OUTLINED : variant
]} {!disablePadding && ]} {!disablePadding &&
'py-2 px-6'} rounded-md {className} w-fit justify-center sm:w-auto {isLoading && 'py-[0.60rem] px-6'} rounded-md {className} w-fit justify-center sm:w-auto {isLoading &&
'py-2 border-blue-700'} {variant !== VARIANTS.TEXT && 'py-[0.60rem] border-blue-700'} {variant !== VARIANTS.TEXT &&
'hover:shadow-xl'} transition delay-150 duration-300 ease-in-out {variant !== 'hover:shadow-xl'} transition delay-150 duration-300 ease-in-out {variant !==
VARIANTS.CONTAINED_WHITE VARIANTS.CONTAINED_WHITE
? 'dark:text-white' ? 'dark:text-white'
+7 -8
View File
@@ -9,13 +9,12 @@ export const currentOrg = writable({
shortName: '', shortName: '',
siteName: '', siteName: '',
avatar_url: '', avatar_url: '',
memberId: '', memberId: ''
}); });
export const orgAudience = writable([]); export const orgAudience = writable([]);
export const orgTeam = writable([]); export const orgTeam = writable([]);
export const currentOrgPath = derived( export const currentOrgPath = derived(currentOrg, ($currentOrg) =>
currentOrg, $currentOrg.siteName ? `/org/${$currentOrg.siteName}` : ''
($currentOrg) => `/org/${$currentOrg.siteName}`
); );
// Quiz // Quiz
@@ -23,13 +22,13 @@ export const createQuizModal = writable({
open: false, open: false,
openEdit: false, openEdit: false,
title: '', title: '',
id: null, id: null
}); });
export const deleteModal = writable({ export const deleteModal = writable({
id: null, id: null,
open: false, open: false,
isQuestion: false, isQuestion: false
}); });
export const quizesStore = writable([]); export const quizesStore = writable([]);
@@ -40,9 +39,9 @@ export const quizStore = writable({
questions: [], questions: [],
timelimit: '10s', timelimit: '10s',
theme: 'standard', theme: 'standard',
pin: '', pin: ''
}); });
export const playQuizStore = writable({ export const playQuizStore = writable({
step: STEPS.CONNECT_TO_PLAY, step: STEPS.CONNECT_TO_PLAY
}); });