Merge branch 'main' of https://gitlab.com/thenextgreat/classroomio
This commit is contained in:
@@ -22,7 +22,8 @@ export const PUBLIC_ROUTES = [
|
||||
ROUTE.FORGOT,
|
||||
ROUTE.RESET,
|
||||
`^${ROUTE.PAGES}/.*`,
|
||||
`^${ROUTE.COURSE}/.*`
|
||||
`^${ROUTE.COURSE}/.*`,
|
||||
'/404'
|
||||
];
|
||||
|
||||
export const ROUTES_TO_HIDE_NAV = [
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
export function setTheme(theme: string) {
|
||||
// In case the default theme is added but another theme exists
|
||||
if (!theme && document.body.className.includes('theme-')) {
|
||||
const regex = /theme-[\w]+/gi;
|
||||
document.body.className = document.body.className.replace(regex, theme);
|
||||
return;
|
||||
}
|
||||
|
||||
// In case theme already exists in dom, don't add
|
||||
if (document.body.className.includes(theme)) return;
|
||||
|
||||
document.body.className = document.body.className.concat(' ', theme);
|
||||
}
|
||||
@@ -147,16 +147,6 @@ export async function getCourseBySiteName(siteName) {
|
||||
if (error) {
|
||||
return [];
|
||||
}
|
||||
const org = get(data, '[0].group.organization', {
|
||||
id: '',
|
||||
name: 'ClassroomIO',
|
||||
shortName: '',
|
||||
siteName: '',
|
||||
avatar_url: '/logo-192.png',
|
||||
landingpage: {},
|
||||
theme: ''
|
||||
});
|
||||
currentOrg.set(org);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user