Solved some more bugs and styling
This commit is contained in:
@@ -151,7 +151,7 @@ export default function FillBlanks({
|
||||
|
||||
<div className="self-end flex justify-between w-full gap-8 absolute bottom-8 left-0 px-8">
|
||||
<Button
|
||||
color="green"
|
||||
color="purple"
|
||||
variant="outline"
|
||||
onClick={() => onBack({exercise: id, solutions: answers, score: calculateScore(), type})}
|
||||
className="max-w-[200px] w-full">
|
||||
@@ -159,7 +159,7 @@ export default function FillBlanks({
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
color="green"
|
||||
color="purple"
|
||||
onClick={() => onNext({exercise: id, solutions: answers, score: calculateScore(), type})}
|
||||
className="max-w-[200px] self-end w-full">
|
||||
Next
|
||||
|
||||
@@ -86,7 +86,7 @@ export default function MatchSentences({id, options, type, prompt, sentences, us
|
||||
|
||||
<div className="self-end flex justify-between w-full gap-8 absolute bottom-8 left-0 px-8">
|
||||
<Button
|
||||
color="green"
|
||||
color="purple"
|
||||
variant="outline"
|
||||
onClick={() => onBack({exercise: id, solutions: answers, score: calculateScore(), type})}
|
||||
className="max-w-[200px] w-full">
|
||||
@@ -94,7 +94,7 @@ export default function MatchSentences({id, options, type, prompt, sentences, us
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
color="green"
|
||||
color="purple"
|
||||
onClick={() => onNext({exercise: id, solutions: answers, score: calculateScore(), type})}
|
||||
className="max-w-[200px] self-end w-full">
|
||||
Next
|
||||
|
||||
@@ -173,7 +173,7 @@ export default function Speaking({id, title, text, type, prompts, onNext, onBack
|
||||
|
||||
<div className="self-end flex justify-between w-full gap-8">
|
||||
<Button
|
||||
color="green"
|
||||
color="purple"
|
||||
variant="outline"
|
||||
onClick={() =>
|
||||
onBack({
|
||||
@@ -187,7 +187,7 @@ export default function Speaking({id, title, text, type, prompts, onNext, onBack
|
||||
Back
|
||||
</Button>
|
||||
<Button
|
||||
color="green"
|
||||
color="purple"
|
||||
disabled={!mediaBlob}
|
||||
onClick={() =>
|
||||
onNext({
|
||||
|
||||
@@ -101,7 +101,7 @@ export default function WriteBlanks({id, prompt, type, maxWords, solutions, user
|
||||
|
||||
<div className="self-end flex justify-between w-full gap-8 absolute bottom-8 left-0 px-8">
|
||||
<Button
|
||||
color="green"
|
||||
color="purple"
|
||||
variant="outline"
|
||||
onClick={() => onBack({exercise: id, solutions: answers, score: calculateScore(), type})}
|
||||
className="max-w-[200px] w-full">
|
||||
@@ -109,7 +109,7 @@ export default function WriteBlanks({id, prompt, type, maxWords, solutions, user
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
color="green"
|
||||
color="purple"
|
||||
onClick={() => onNext({exercise: id, solutions: answers, score: calculateScore(), type})}
|
||||
className="max-w-[200px] self-end w-full">
|
||||
Next
|
||||
|
||||
@@ -98,14 +98,14 @@ export default function Writing({id, prompt, info, type, wordCounter, attachment
|
||||
|
||||
<div className="self-end flex justify-between w-full gap-8 absolute bottom-8 left-0 px-8">
|
||||
<Button
|
||||
color="green"
|
||||
color="purple"
|
||||
variant="outline"
|
||||
onClick={() => onBack({exercise: id, solutions: [{id, solution: inputText}], score: {correct: 1, total: 1, missing: 0}, type})}
|
||||
className="max-w-[200px] self-end w-full">
|
||||
Back
|
||||
</Button>
|
||||
<Button
|
||||
color="green"
|
||||
color="purple"
|
||||
disabled={!isSubmitEnabled}
|
||||
onClick={() => onNext({exercise: id, solutions: [{id, solution: inputText}], score: {correct: 1, total: 1, missing: 0}, type})}
|
||||
className="max-w-[200px] self-end w-full">
|
||||
|
||||
@@ -14,7 +14,7 @@ export default function Navbar({user}: Props) {
|
||||
<div className="flex justify-between w-5/6 mr-8">
|
||||
<input type="text" placeholder="Search..." className="rounded-full py-4 px-6 border border-mti-gray-platinum outline-none" />
|
||||
<Link href="/profile" className="flex gap-3 items-center justify-end">
|
||||
<img src={user.profilePicture} alt={user.name} className="w-10 h-10 rounded-full" />
|
||||
<img src={user.profilePicture} alt={user.name} className="w-10 h-10 rounded-full object-cover" />
|
||||
<span className="text-right">{user.name}</span>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@ export default function ProfileCard({user, className}: Props) {
|
||||
<div className={clsx("bg-white drop-shadow-xl p-4 md:p-8 rounded-xl w-full flex flex-col gap-6", className)}>
|
||||
<div className="flex w-full items-center gap-8">
|
||||
<div className="w-16 md:w-24 h-16 md:h-24 rounded-full border-2 md:border-4 border-white drop-shadow-md md:drop-shadow-xl">
|
||||
{user.profilePicture.length > 0 && <img src={user.profilePicture} alt="Profile picture" className="rounded-full" />}
|
||||
{user.profilePicture.length > 0 && <img src={user.profilePicture} alt="Profile picture" className="rounded-full object-cover" />}
|
||||
{user.profilePicture.length === 0 && (
|
||||
<Avatar size="xlarge" style={{width: "100%", height: "100%"}} label={user.name.slice(0, 1)} shape="circle" />
|
||||
)}
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function ProfileLevel({user, className}: Props) {
|
||||
return (
|
||||
<div className={clsx("flex flex-col items-center justify-center gap-4", className)}>
|
||||
<div className="w-16 md:w-24 h-16 md:h-24 rounded-full">
|
||||
{user.profilePicture.length > 0 && <img src={user.profilePicture} alt="Profile picture" className="rounded-full" />}
|
||||
{user.profilePicture.length > 0 && <img src={user.profilePicture} alt="Profile picture" className="rounded-full object-cover" />}
|
||||
{user.profilePicture.length === 0 && (
|
||||
<Avatar size="xlarge" style={{width: "100%", height: "100%"}} label={user.name.slice(0, 1)} shape="circle" />
|
||||
)}
|
||||
|
||||
@@ -37,7 +37,7 @@ export default function Sidebar({path}: Props) {
|
||||
|
||||
const logout = async () => {
|
||||
axios.post("/api/logout").finally(() => {
|
||||
router.push("/login");
|
||||
setTimeout(() => router.reload(), 500);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user