mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: canva activity bug
This commit is contained in:
parent
40414e9478
commit
079c8182cb
2 changed files with 22 additions and 2 deletions
|
|
@ -39,7 +39,7 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
|
||||||
const course_meta = await fetchCourseMetadata(params.courseuuid, access_token)
|
const course_meta = await fetchCourseMetadata(params.courseuuid, access_token)
|
||||||
const activity = await getActivityWithAuthHeader(
|
const activity = await getActivityWithAuthHeader(
|
||||||
params.activityid,
|
params.activityid,
|
||||||
{ revalidate: 1800, tags: ['activities'] },
|
{ revalidate: 0, tags: ['activities'] },
|
||||||
access_token || null
|
access_token || null
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@ const ActivityPage = async (params: any) => {
|
||||||
fetchCourseMetadata(courseuuid, access_token),
|
fetchCourseMetadata(courseuuid, access_token),
|
||||||
getActivityWithAuthHeader(
|
getActivityWithAuthHeader(
|
||||||
activityid,
|
activityid,
|
||||||
{ revalidate: 60, tags: ['activities'] },
|
{ revalidate: 0, tags: ['activities'] },
|
||||||
access_token || null
|
access_token || null
|
||||||
)
|
)
|
||||||
])
|
])
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,26 @@ const ContentWrapper = styled.div`
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only apply flex layout when there are multiple children (table of contents present)
|
||||||
|
&:has(> div:first-child:not(:last-child)) {
|
||||||
|
> div:first-child {
|
||||||
|
width: 20%;
|
||||||
|
padding-right: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
> div:last-child {
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// When there's only one child (no table of contents), make it full width
|
||||||
|
&:has(> div:first-child:last-child) {
|
||||||
|
> div:first-child {
|
||||||
|
width: 100%;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.ProseMirror {
|
.ProseMirror {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue